diff options
author | jacopograndi <jak.sk8@hotmail.it> | 2021-08-31 23:53:53 +0200 |
---|---|---|
committer | jacopograndi <jak.sk8@hotmail.it> | 2021-08-31 23:53:53 +0200 |
commit | 8af1284654a4a5d454a559eca371bf0ac3c79786 (patch) | |
tree | 70e9cf9d3d11a205175bdad394b6201870cf7f07 /game/view.cpp | |
parent | fb5a98b72ab79949d1da7f75a3d6150c2906ef40 (diff) |
tech done, building sprites, upgrade on age up, gui
Diffstat (limited to 'game/view.cpp')
-rw-r--r-- | game/view.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/game/view.cpp b/game/view.cpp index 095a99a..7fddcd5 100644 --- a/game/view.cpp +++ b/game/view.cpp @@ -41,6 +41,12 @@ void View::process (Gst &gst, vec2 cam, vec2 mouse, int *mheld) { if (menu_tech.active) { menu_tech.over = menu_tech.mouse_option(mouse); } + if (menu_trade.active) { + menu_trade.over = menu_trade.mouse_option(mouse); + } + if (menu_age_up.active) { + menu_age_up.over = menu_age_up.mouse_option(mouse); + } if (mheld[0] == 1) { bool found = false; @@ -124,6 +130,24 @@ void View::process (Gst &gst, vec2 cam, vec2 mouse, int *mheld) { back = 1; found = 1; } } + + if (menu_trade.active && !found) { + int selected = menu_trade.mouse_option(mouse); + if (selected != -1) { + opt = selected; found = true; + } else { + back = 1; found = 1; + } + } + + if (menu_age_up.active && !found) { + int selected = menu_age_up.mouse_option(mouse); + if (selected != -1) { + opt = selected; found = true; + } else { + back = 1; found = 1; + } + } for (int i=0; i<entities.size() && !found; i++) { if (entities[i].done) continue; |