Skip to content

Commit

Permalink
Add a "disabled" stockpile icon
Browse files Browse the repository at this point in the history
Displayed when stockpile to a warehouse is not enabled
  • Loading branch information
Ouaz committed Feb 10, 2024
1 parent 281a0ed commit 3d42281
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Binary file added res/assets/Graphics/UI/Warehousing_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions res/assets/Graphics/ui.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
<image id="Allowed_Walker_Check" src="Allowed_Walker_Checkmark"/>
<!-- Warehousing icon by Ouaz -->
<image id="Warehousing" src="Warehousing"/>
<image id="Warehousing_off" src="Warehousing_off"/>
<image id="Maintain_1" src="Maintain_1"/>
<!-- Normal -->
<image id="Maintain_2" src="Maintain_2"/>
Expand Down
7 changes: 4 additions & 3 deletions src/window/building/distribution.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ static struct {
};

static generic_button primary_product_producer_button_stockpiling[] = {
{350, 3, 24, 24, button_stockpiling, button_none, 0, 0}
{360, 3, 24, 24, button_stockpiling, button_none, 0, 0}
};

static struct {
Expand Down Expand Up @@ -609,9 +609,10 @@ void window_building_draw_primary_product_stockpiling(building_info_context *c)
int x = c->x_offset + primary_product_producer_button_stockpiling->x;
int y = c->y_offset + primary_product_producer_button_stockpiling->y + BLOCK_SIZE * c->height_blocks - 40;
button_border_draw(x, y, 20, 20, data.primary_product_stockpiling_id);
image_draw(assets_get_image_id("UI", "Warehousing"), x + 23, y + 4, COLOR_MASK_NONE, SCALE_NONE);
if (building_stockpiling_enabled(building_get(c->building_id))) {
image_draw(assets_get_image_id("UI", "Allowed_Walker_Check"), x + 4, y + 4, COLOR_MASK_NONE, SCALE_NONE);
image_draw(assets_get_image_id("UI", "Warehousing"), x + 4, y + 4, COLOR_MASK_NONE, SCALE_NONE);
} else {
image_draw(assets_get_image_id("UI", "Warehousing_off"), x + 4, y + 4, COLOR_MASK_NONE, SCALE_NONE);
}
}

Expand Down

0 comments on commit 3d42281

Please sign in to comment.