Refactor the scenario editor's monolithic handle_action function into several smaller chunks

This commit is contained in:
2015-06-06 00:01:45 -04:00
parent 9f8e6f88c2
commit 2b4ca2d0a5
3 changed files with 1056 additions and 1046 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,11 +1,11 @@
void init_current_terrain();
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 swap_terrain();
void set_new_terrain(ter_num_t selected_terrain);
void handle_keystroke(sf::Event event);
bool handle_scroll(sf::Event& event);
void handle_scroll(sf::Event& event);
void get_wandering_monst();
void get_town_info();
void get_sign_resource();

View File

@@ -535,9 +535,7 @@ void Mouse_Pressed() {
updater.join();
redraw_screen(/*REFRESH_RIGHT_BAR*/);
set_up_terrain_buttons(false);
}
else // ordinary click
All_Done = handle_action(loc(event.mouseButton.x,event.mouseButton.y),event);
} else handle_action(loc(event.mouseButton.x,event.mouseButton.y),event);
}
void close_program() {