~comcloudway/little_town

a4c112c0ce4af49340c272d64b43b52f5f952449 — Jakob Meier 1 year, 4 months ago e69c069
Minor improvements
2 files changed, 7 insertions(+), 6 deletions(-)

M src/game/blocks.rs
M src/screens/build.rs
M src/game/blocks.rs => src/game/blocks.rs +3 -3
@@ 223,9 223,9 @@ auto_gen_blocks!(
    ( CastleWindow, "base/Tiles/castle_window", [Building] ),

    ( Cliff, "exp/Tiles/cliff", [Block] ),
    ( CliffCorner, "exp/Tiles/cliff", [Block] ),
    ( CliffCornerInner, "exp/Tiles/cliff", [Block] ),
    ( CliffEntrance, "exp/Tiles/cliff", [Block] ),
    ( CliffCorner, "exp/Tiles/cliff_corner", [Block] ),
    ( CliffCornerInner, "exp/Tiles/cliff_cornerInner", [Block] ),
    ( CliffEntrance, "exp/Tiles/cliff_entrance", [Block] ),
    ( CliffTop, "exp/Tiles/cliff_top", [Block] ),
    ( CliffTopEntrance, "exp/Tiles/cliff_topEntrance", [Block] ),
    ( CliffTopCorner, "exp/Tiles/cliff_topCorner", [Block] ),

M src/screens/build.rs => src/screens/build.rs +4 -3
@@ 142,10 142,10 @@ impl InventoryWidgets {
    fn page_down(&mut self, inv: &mut Inventory) {
        let list = inv.category.get_blocks();
        let mut page = self.page;
        if page <= 0 {
            page = list.len().div_ceil(9)-1;
        } else {
        if page > 0 {
            page -= 1;
        } else {
            page = list.len().div_ceil(9)-1;
        }
        self.load_page(page, inv);
    }


@@ 366,6 366,7 @@ impl GameComponent for BuildScreen {
                    _ => ()
                }

                // update the top-right item indicator
                {
                    let amount = if let Some(block) = &world.inventory.selected {
                        if let Some(a) = world.inventory.contents.get(block) {