Refactor the scenario editor's monolithic handle_action function into several smaller chunks
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,11 @@
|
|||||||
void init_current_terrain();
|
void init_current_terrain();
|
||||||
void init_screen_locs();
|
void init_screen_locs();
|
||||||
bool handle_action(location the_point,sf::Event event);
|
void handle_action(location the_point,sf::Event event);
|
||||||
void flash_rect(rectangle to_flash);
|
void flash_rect(rectangle to_flash);
|
||||||
void swap_terrain();
|
void swap_terrain();
|
||||||
void set_new_terrain(ter_num_t selected_terrain);
|
void set_new_terrain(ter_num_t selected_terrain);
|
||||||
void handle_keystroke(sf::Event event);
|
void handle_keystroke(sf::Event event);
|
||||||
bool handle_scroll(sf::Event& event);
|
void handle_scroll(sf::Event& event);
|
||||||
void get_wandering_monst();
|
void get_wandering_monst();
|
||||||
void get_town_info();
|
void get_town_info();
|
||||||
void get_sign_resource();
|
void get_sign_resource();
|
||||||
|
@@ -535,9 +535,7 @@ void Mouse_Pressed() {
|
|||||||
updater.join();
|
updater.join();
|
||||||
redraw_screen(/*REFRESH_RIGHT_BAR*/);
|
redraw_screen(/*REFRESH_RIGHT_BAR*/);
|
||||||
set_up_terrain_buttons(false);
|
set_up_terrain_buttons(false);
|
||||||
}
|
} else handle_action(loc(event.mouseButton.x,event.mouseButton.y),event);
|
||||||
else // ordinary click
|
|
||||||
All_Done = handle_action(loc(event.mouseButton.x,event.mouseButton.y),event);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void close_program() {
|
void close_program() {
|
||||||
|
Reference in New Issue
Block a user