diff options
Diffstat (limited to 'src/scenes')
| -rw-r--r-- | src/scenes/place_detail.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/scenes/place_detail.c b/src/scenes/place_detail.c index f214347..1a7d832 100644 --- a/src/scenes/place_detail.c +++ b/src/scenes/place_detail.c @@ -627,6 +627,8 @@ static void place_detail_draw_active_dealer(platform_window* window, truck_deale button_type type2 = purchase_animation.started || swap_animation.started ? BUTTON_STATIC : BUTTON_ENABLED;
if (_active_world->money < tr_curr->price)
type2 = BUTTON_DISABLED;
+ if (_active_location->trucks.length == MAX_TRUCK_COUNT-1)
+ type2 = BUTTON_DISABLED;
if (button_render(scale, type2, "purchase", btn_x, text_y, center_btn_w, btn_size)) {
ADD_EXPENSE(_active_world, _active_location, expenses_from_trucks, tr_curr->price)
add_truck_to_world_location(_active_world, _active_location, tr_curr);
@@ -1508,7 +1510,7 @@ static void place_detail_draw_resumes(platform_window* window) s32 pad = 20 * scale;
s32 btn_y = panel_y + panel_h + pad;
s32 btn_x = panel_x;
- if (button_render(scale, true, "Hire", btn_x, btn_y, button_w, button_h)) {
+ if (button_render(scale, _active_location->employees.length == MAX_EMPLOYEE_COUNT-1 ? BUTTON_DISABLED : BUTTON_ENABLED, "Hire", btn_x, btn_y, button_w, button_h)) {
audio_play_sound(snd_click2, AUDIO_CHANNEL_SFX_1);
resume->animation.started = true;
resume->hired = true;
|
