Factor out the game toolbars into a class.
This includes the following related or incidental changes: * Remove the win_from_rects global variable. With one minor exception, they were all equal to the relevant render texture's size anyway. * Split out time advancement from the handle_action function into a separate function * Split out each individual button action into its own function * Thanks to the above two, button actions triggered from the keyboard (and menu spells) no longer pass thru handle_action * Side-effect: keyboard shortcuts and menu spells no longer trigger the button press animation * Button presses now behave like proper buttons * Button clicks are now grouped by effect in the handling code, rather than by index * Removed a variable that mysteriously caused dialogue to become blank
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "boe.locutils.hpp"
|
||||
#include "boe.specials.hpp"
|
||||
#include "boe.infodlg.hpp"
|
||||
#include "boe.ui.hpp"
|
||||
#include "mathutil.hpp"
|
||||
#include "render_image.hpp"
|
||||
#include "render_shapes.hpp"
|
||||
@@ -703,7 +704,7 @@ void start_town_combat(eDirection direction) {
|
||||
set_pc_moves();
|
||||
pick_next_pc();
|
||||
center = univ.current_pc().combat_pos;
|
||||
draw_buttons(0);
|
||||
UI::toolbar.draw(mainPtr);
|
||||
put_pc_screen();
|
||||
set_stat_window_for_pc(univ.cur_pc);
|
||||
give_help(48,49);
|
||||
|
Reference in New Issue
Block a user