don't show Jobs button if scenario has no quests in it

This commit is contained in:
2025-05-03 10:57:07 -05:00
parent 594cd98e0d
commit f374122adc
2 changed files with 13 additions and 2 deletions

View File

@@ -50,9 +50,13 @@
#include "fileio/resmgr/res_font.hpp"
rectangle item_screen_button_rects[9] = {
// PC 1-6
{125,10,141,28},{125,40,141,58},{125,68,141,86},{125,98,141,116},{125,126,141,144},{125,156,141,174},
// Special Items
{126,176,141,211},
// Quests
{126,213,141,248},
// Help
{127,251,140,267}
};
rectangle medium_buttons[4] = {

View File

@@ -532,8 +532,15 @@ void place_item_bottom_buttons() {
}
to_rect = item_screen_button_rects[6];
rect_draw_some_item(invenbtn_gworld, spec_from_rect, item_stats_gworld(), to_rect, sf::BlendAlpha);
to_rect = item_screen_button_rects[7];
rect_draw_some_item(invenbtn_gworld, job_from_rect, item_stats_gworld(), to_rect, sf::BlendAlpha);
// Don't draw the Jobs button if the scenario has none
item_bottom_button_active[7] = false;
if(!univ.scenario.quests.empty()){
item_bottom_button_active[7] = true;
to_rect = item_screen_button_rects[7];
rect_draw_some_item(invenbtn_gworld, job_from_rect, item_stats_gworld(), to_rect, sf::BlendAlpha);
}
to_rect = item_screen_button_rects[8];
rect_draw_some_item(invenbtn_gworld, help_from_rect, item_stats_gworld(), to_rect, sf::BlendAlpha);
}