Commits

Andrey Lesnikov  committed 068aba6

ui_sdl: Added 'main' to on_*_button().

  • Participants
  • Parent commits 7fde2d2

Comments (0)

Files changed (1)

 static void on_menu_sc02_button (void);
 static void on_menu_net01_button (void);
 static void on_menu_net02_button (void);
-static void on_quit_to_menu (void);
-static void on_transport_in_button (void);
-static void on_transport_out_button (void);
-static void on_rot_cw_button (void);
-static void on_rot_ccw_button (void);
+static void on_main_quit_to_menu (void);
+static void on_main_transport_in_button (void);
+static void on_main_transport_out_button (void);
+static void on_main_rot_cw_button (void);
+static void on_main_rot_ccw_button (void);
 
 static SDL_Surface *
 loadimg (char *str){
 }
 
 static void
-on_quit_to_menu (void){
+on_main_quit_to_menu (void){
   selected_unit = NULL;
   selected_tile = mk_mcrd(0, 0);
   cleanup();
   add_button(create_text(&sfont, "end turn"),
       mk_scrd(10, 15*5), endturn);
   add_button(create_text(&sfont, "quit"),
-      mk_scrd(10, 15*6), on_quit_to_menu);
+      mk_scrd(10, 15*6), on_main_quit_to_menu);
   add_button(create_text(&sfont, "transport <-"),
-      mk_scrd(10, 15*7), on_transport_in_button);
+      mk_scrd(10, 15*7), on_main_transport_in_button);
   add_button(create_text(&sfont, "transport ->"),
-      mk_scrd(10, 15*8), on_transport_out_button);
+      mk_scrd(10, 15*8), on_main_transport_out_button);
   add_button(create_text(&sfont, "rotate CW"),
-      mk_scrd(10, 15*9), on_rot_cw_button);
+      mk_scrd(10, 15*9), on_main_rot_cw_button);
   add_button(create_text(&sfont, "rotate CCW"),
-      mk_scrd(10, 15*10), on_rot_ccw_button);
+      mk_scrd(10, 15*10), on_main_rot_ccw_button);
 }
 
 static void
 }
 
 static void
-on_transport_in_button (void){
+on_main_transport_in_button (void){
   transport_in(selected_unit);
 }
 
 static void
-on_transport_out_button (void){
+on_main_transport_out_button (void){
   if(find_skill(selected_unit, S_TRANSPORT))
     transport_out(selected_unit);
 }
 
 static void
-on_rot_cw_button (void){
+on_main_rot_cw_button (void){
   if(selected_unit)
     rotate(selected_unit, 1);
 }
 
 static void
-on_rot_ccw_button (void){
+on_main_rot_ccw_button (void){
   if(selected_unit)
     rotate(selected_unit, -1);
 }
   switch(e.keysym.sym) {
     case SDLK_ESCAPE:
     case SDLK_q:
-      on_quit_to_menu();
+      on_main_quit_to_menu();
       break;
     case SDLK_UP:
       map_offset.y += 2*96*3/4;