diff --git a/README.md b/README.md index 135de52..366d445 100644 --- a/README.md +++ b/README.md @@ -92,12 +92,12 @@ logic mostly like https://git.crispypin.cc/CrispyPin/marble ### intro, basic mechanics - output a zero (marble, io) - output multiple numbers in sequence (digits) -- output zeroes forever (looping, trigger, bag output) +- output zeroes forever (looping, button, silo output) - copy the input (input) - copy only odd input numbers (comparator, math, flipper) ### 0-terminated list processing - copy the second list -- calculate list length (math, bag input) +- calculate list length (math, silo input) - count instances of 5 in a list - reverse a list (bouncing) ### user-friendly numbers diff --git a/assets/tiles/bag_off.png b/assets/tiles/bag_off.png deleted file mode 100644 index c270af5..0000000 Binary files a/assets/tiles/bag_off.png and /dev/null differ diff --git a/assets/tiles/bag_on.png b/assets/tiles/bag_on.png deleted file mode 100644 index 9630dab..0000000 Binary files a/assets/tiles/bag_on.png and /dev/null differ diff --git a/assets/tiles/button_off.png b/assets/tiles/button_off.png new file mode 100644 index 0000000..9998e45 Binary files /dev/null and b/assets/tiles/button_off.png differ diff --git a/assets/tiles/button_on.png b/assets/tiles/button_on.png new file mode 100644 index 0000000..ff8b8c6 Binary files /dev/null and b/assets/tiles/button_on.png differ diff --git a/assets/tiles/flipper_off.png b/assets/tiles/flipper_off.png index 71c7983..8f5ee16 100644 Binary files a/assets/tiles/flipper_off.png and b/assets/tiles/flipper_off.png differ diff --git a/assets/tiles/flipper_on.png b/assets/tiles/flipper_on.png index 7da4ad9..ae6038c 100644 Binary files a/assets/tiles/flipper_on.png and b/assets/tiles/flipper_on.png differ diff --git a/assets/tiles/silo_off.png b/assets/tiles/silo_off.png new file mode 100644 index 0000000..27d9c13 Binary files /dev/null and b/assets/tiles/silo_off.png differ diff --git a/assets/tiles/silo_on.png b/assets/tiles/silo_on.png new file mode 100644 index 0000000..d3c62de Binary files /dev/null and b/assets/tiles/silo_on.png differ diff --git a/assets/tiles/trigger_off.png b/assets/tiles/trigger_off.png deleted file mode 100644 index a818b72..0000000 Binary files a/assets/tiles/trigger_off.png and /dev/null differ diff --git a/assets/tiles/trigger_on.png b/assets/tiles/trigger_on.png deleted file mode 100644 index f730800..0000000 Binary files a/assets/tiles/trigger_on.png and /dev/null differ diff --git a/assets/tiles/wire_cross_off.png b/assets/tiles/wire_cross_off.png index 3b582ca..b511c34 100644 Binary files a/assets/tiles/wire_cross_off.png and b/assets/tiles/wire_cross_off.png differ diff --git a/assets/tiles/wire_cross_on.png b/assets/tiles/wire_cross_on.png index c21ee12..d79ca2c 100644 Binary files a/assets/tiles/wire_cross_on.png and b/assets/tiles/wire_cross_on.png differ diff --git a/assets/tiles/wire_horizontal_off.png b/assets/tiles/wire_horizontal_off.png index b03fd94..c0ac36e 100644 Binary files a/assets/tiles/wire_horizontal_off.png and b/assets/tiles/wire_horizontal_off.png differ diff --git a/assets/tiles/wire_horizontal_on.png b/assets/tiles/wire_horizontal_on.png index 4c5f82d..3a96166 100644 Binary files a/assets/tiles/wire_horizontal_on.png and b/assets/tiles/wire_horizontal_on.png differ diff --git a/assets/tiles/wire_vertical_off.png b/assets/tiles/wire_vertical_off.png index 7d060e4..4b81df0 100644 Binary files a/assets/tiles/wire_vertical_off.png and b/assets/tiles/wire_vertical_off.png differ diff --git a/assets/tiles/wire_vertical_on.png b/assets/tiles/wire_vertical_on.png index 37d508c..59222fc 100644 Binary files a/assets/tiles/wire_vertical_on.png and b/assets/tiles/wire_vertical_on.png differ diff --git a/src/editor.rs b/src/editor.rs index e67c760..b09f011 100644 --- a/src/editor.rs +++ b/src/editor.rs @@ -786,8 +786,8 @@ impl Editor { if !hide_tile_tools { tool_button((0, 0), "block", Tool::SetTile(Tile::from_char('#'))); - tool_button((0, 1), "bag_off", Tool::SetTile(Tile::from_char('B'))); - tool_button((0, 2), "trigger_off", Tool::SetTile(Tile::from_char('*'))); + tool_button((0, 1), "silo_off", Tool::SetTile(Tile::from_char('B'))); + tool_button((0, 2), "button_off", Tool::SetTile(Tile::from_char('*'))); tool_button((0, 3), "io_tile_off", Tool::SetTile(Tile::from_char('I'))); tool_button((0, 4), "flipper_off", Tool::SetTile(Tile::from_char('F'))); tool_button((0, 5), "digit_tool", Tool::Digits(None)); diff --git a/src/marble_engine.rs b/src/marble_engine.rs index e2eb928..c682a91 100644 --- a/src/marble_engine.rs +++ b/src/marble_engine.rs @@ -319,7 +319,6 @@ impl Machine { } } - // let mut triggers_activated = Vec::new(); let mut removed_marbles = Vec::new(); // move marbles for (i, pos) in self.marbles[..old_marbles].iter_mut().enumerate() { diff --git a/src/marble_engine/tile.rs b/src/marble_engine/tile.rs index d58c414..03e98ed 100644 --- a/src/marble_engine/tile.rs +++ b/src/marble_engine/tile.rs @@ -177,9 +177,9 @@ impl Tile { Tile::Arrow(dir) => dir.arrow_tile_texture_name(), Tile::Button(state) => { if *state { - "trigger_on" + "button_on" } else { - "trigger_off" + "button_off" } } Tile::Wire(wire, state) => { @@ -193,7 +193,7 @@ impl Tile { let root = match tile { PTile::Gate(gate) => gate.texture_name(), PTile::Math(math_op) => math_op.texture_name(), - PTile::Silo => "bag", + PTile::Silo => "silo", PTile::Flipper => "flipper", PTile::IO => "io_tile", }; diff --git a/src/theme.rs b/src/theme.rs index 137ede1..6d9cdc8 100644 --- a/src/theme.rs +++ b/src/theme.rs @@ -3,9 +3,10 @@ use raylib::prelude::*; pub const BG_DARK: Color = gray(32); pub const BG_MEDIUM: Color = gray(48); pub const BG_LIGHT: Color = gray(64); -pub const BG_WIDGET: Color = gray(96); +pub const BG_WIDGET: Color = gray(64); pub const BG_WIDGET_ACTIVE: Color = rgb(80, 120, 180); pub const FG_MARBLE_VALUE: Color = rgb(255, 80, 40); +pub const FG_TOGGLE_ENABLED: Color = gray(200); pub const fn widget_bg(highlight: bool) -> Color { if highlight { diff --git a/src/util.rs b/src/util.rs index e0baf10..98dd8cb 100644 --- a/src/util.rs +++ b/src/util.rs @@ -68,7 +68,7 @@ pub fn simple_toggle_button( y + margin, width - margin * 2, height - margin * 2, - BG_DARK, + FG_TOGGLE_ENABLED, ); } if hover && d.is_mouse_button_pressed(MouseButton::MOUSE_BUTTON_LEFT) {