diff options
Diffstat (limited to 'src/scenes/place_detail.c')
| -rw-r--r-- | src/scenes/place_detail.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/scenes/place_detail.c b/src/scenes/place_detail.c index 372a659..01e7d71 100644 --- a/src/scenes/place_detail.c +++ b/src/scenes/place_detail.c @@ -625,6 +625,8 @@ static void place_detail_draw_active_dealer(platform_window* window, truck_deale btn_x += btn_size;
s32 center_btn_w = 100*scale;
button_type type2 = purchase_animation.started || swap_animation.started ? BUTTON_STATIC : BUTTON_ENABLED;
+ if (_active_world->money < tr_curr->price)
+ 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);
|
