Author: mir3x
Date: Sun Nov 20 23:29:27 2016
New Revision: 34596

URL: http://svn.gna.org/viewcvs/freeciv?rev=34596&view=rev
Log:
Added new function popup_combat_info

See patch #7997


Modified:
    trunk/client/gui-gtk-2.0/dialogs.c
    trunk/client/gui-gtk-3.0/dialogs.c
    trunk/client/gui-gtk-3.22/dialogs.c
    trunk/client/gui-qt/dialogs.cpp
    trunk/client/gui-qt/qtg_cxxside.cpp
    trunk/client/gui-qt/qtg_cxxside.h
    trunk/client/gui-sdl2/dialogs.c
    trunk/client/gui-stub/dialogs.c
    trunk/client/gui_interface.c
    trunk/client/gui_interface.h
    trunk/client/include/dialogs_g.h
    trunk/client/packhand.c

Modified: trunk/client/gui-gtk-2.0/dialogs.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-2.0/dialogs.c?rev=34596&r1=34595&r2=34596&view=diff
==============================================================================
--- trunk/client/gui-gtk-2.0/dialogs.c  (original)
+++ trunk/client/gui-gtk-2.0/dialogs.c  Sun Nov 20 23:29:27 2016
@@ -1550,3 +1550,13 @@
 {
   return FALSE; /* Unit was not handled here. */
 }
+
+/***************************************************************************
+  Popup detailed information about battle or save information for
+  some kind of statistics
+***************************************************************************/
+void popup_combat_info(int attacker_unit_id, int defender_unit_id,
+                       int attacker_hp, int defender_hp,
+                       bool make_winner_veteran)
+{
+}

Modified: trunk/client/gui-gtk-3.0/dialogs.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.0/dialogs.c?rev=34596&r1=34595&r2=34596&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.0/dialogs.c  (original)
+++ trunk/client/gui-gtk-3.0/dialogs.c  Sun Nov 20 23:29:27 2016
@@ -1554,3 +1554,14 @@
   /* Just tell the client common code to handle this. */
   return FALSE;
 }
+
+/***************************************************************************
+  Popup detailed information about battle or save information for
+  some kind of statistics
+***************************************************************************/
+void popup_combat_info(int attacker_unit_id, int defender_unit_id,
+                       int attacker_hp, int defender_hp,
+                       bool make_winner_veteran)
+{
+}
+

Modified: trunk/client/gui-gtk-3.22/dialogs.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-gtk-3.22/dialogs.c?rev=34596&r1=34595&r2=34596&view=diff
==============================================================================
--- trunk/client/gui-gtk-3.22/dialogs.c (original)
+++ trunk/client/gui-gtk-3.22/dialogs.c Sun Nov 20 23:29:27 2016
@@ -1548,3 +1548,13 @@
   /* Just tell the client common code to handle this. */
   return FALSE;
 }
+
+/***************************************************************************
+  Popup detailed information about battle or save information for
+  some kind of statistics
+***************************************************************************/
+void popup_combat_info(int attacker_unit_id, int defender_unit_id,
+                       int attacker_hp, int defender_hp,
+                       bool make_winner_veteran)
+{
+}

Modified: trunk/client/gui-qt/dialogs.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/dialogs.cpp?rev=34596&r1=34595&r2=34596&view=diff
==============================================================================
--- trunk/client/gui-qt/dialogs.cpp     (original)
+++ trunk/client/gui-qt/dialogs.cpp     Sun Nov 20 23:29:27 2016
@@ -3560,3 +3560,13 @@
   hul->show_me();
   return true;
 }
+
+/***************************************************************************
+  Popup detailed information about battle or save information for
+  some kind of statistics
+***************************************************************************/
+void qtg_popup_combat_info(int attacker_unit_id, int defender_unit_id,
+                           int attacker_hp, int defender_hp,
+                           bool make_winner_veteran)
+{
+}

Modified: trunk/client/gui-qt/qtg_cxxside.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/qtg_cxxside.cpp?rev=34596&r1=34595&r2=34596&view=diff
==============================================================================
--- trunk/client/gui-qt/qtg_cxxside.cpp (original)
+++ trunk/client/gui-qt/qtg_cxxside.cpp Sun Nov 20 23:29:27 2016
@@ -93,6 +93,7 @@
   funcs->editgui_tileset_changed = qtg_editgui_tileset_changed;
   funcs->editgui_popdown_all = qtg_editgui_popdown_all;
 
+  funcs->popup_combat_info = qtg_popup_combat_info;
   funcs->update_timeout_label = qtg_update_timeout_label;
   funcs->real_city_dialog_popup = qtg_real_city_dialog_popup;
   funcs->real_city_dialog_refresh = qtg_real_city_dialog_refresh;

Modified: trunk/client/gui-qt/qtg_cxxside.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/qtg_cxxside.h?rev=34596&r1=34595&r2=34596&view=diff
==============================================================================
--- trunk/client/gui-qt/qtg_cxxside.h   (original)
+++ trunk/client/gui-qt/qtg_cxxside.h   Sun Nov 20 23:29:27 2016
@@ -100,6 +100,9 @@
 void qtg_real_set_client_page(enum client_pages page);
 enum client_pages qtg_get_current_client_page();
 
+void qtg_popup_combat_info(int attacker_unit_id, int defender_unit_id,
+                           int attacker_hp, int defender_hp,
+                           bool make_winner_veteran);
 void qtg_set_unit_icon(int idx, struct unit *punit);
 void qtg_set_unit_icons_more_arrow(bool onoff);
 void qtg_real_focus_units_changed(void);

Modified: trunk/client/gui-sdl2/dialogs.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-sdl2/dialogs.c?rev=34596&r1=34595&r2=34596&view=diff
==============================================================================
--- trunk/client/gui-sdl2/dialogs.c     (original)
+++ trunk/client/gui-sdl2/dialogs.c     Sun Nov 20 23:29:27 2016
@@ -3751,3 +3751,13 @@
 {
   return FALSE; /* Unit was not handled here. */
 }
+
+/***************************************************************************
+  Popup detailed information about battle or save information for
+  some kind of statistics
+***************************************************************************/
+void popup_combat_info(int attacker_unit_id, int defender_unit_id,
+                       int attacker_hp, int defender_hp,
+                       bool make_winner_veteran)
+{
+}

Modified: trunk/client/gui-stub/dialogs.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-stub/dialogs.c?rev=34596&r1=34595&r2=34596&view=diff
==============================================================================
--- trunk/client/gui-stub/dialogs.c     (original)
+++ trunk/client/gui-stub/dialogs.c     Sun Nov 20 23:29:27 2016
@@ -302,3 +302,13 @@
 {
   return FALSE; /* Unit was not handled here. */
 }
+
+/***************************************************************************
+  Popup detailed information about battle or save information for
+  some kind of statistics
+***************************************************************************/
+void popup_combat_info(int attacker_unit_id, int defender_unit_id,
+                       int attacker_hp, int defender_hp,
+                       bool make_winner_veteran)
+{
+}

Modified: trunk/client/gui_interface.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui_interface.c?rev=34596&r1=34595&r2=34596&view=diff
==============================================================================
--- trunk/client/gui_interface.c        (original)
+++ trunk/client/gui_interface.c        Sun Nov 20 23:29:27 2016
@@ -501,6 +501,17 @@
 }
 
 /****************************************************************************
+  Call popup_combat_info callback
+****************************************************************************/
+void popup_combat_info(int attacker_unit_id, int defender_unit_id,
+                       int attacker_hp, int defender_hp,
+                       bool make_winner_veteran)
+{
+  funcs.popup_combat_info(attacker_unit_id, defender_unit_id,
+                          attacker_hp, defender_hp, make_winner_veteran);
+}
+
+/****************************************************************************
   Call update_timeout_label callback
 ****************************************************************************/
 void update_timeout_label(void)

Modified: trunk/client/gui_interface.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui_interface.h?rev=34596&r1=34595&r2=34596&view=diff
==============================================================================
--- trunk/client/gui_interface.h        (original)
+++ trunk/client/gui_interface.h        Sun Nov 20 23:29:27 2016
@@ -122,6 +122,9 @@
   void (*editgui_tileset_changed)(void);
   void (*editgui_popdown_all)(void);
 
+  void (*popup_combat_info)(int attacker_unit_id, int defender_unit_id,
+                            int attacker_hp, int defender_hp,
+                            bool make_winner_veteran);
   void (*update_timeout_label)(void);
   void (*real_city_dialog_popup)(struct city *pcity);
   void (*real_city_dialog_refresh)(struct city *pcity);

Modified: trunk/client/include/dialogs_g.h
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/include/dialogs_g.h?rev=34596&r1=34595&r2=34596&view=diff
==============================================================================
--- trunk/client/include/dialogs_g.h    (original)
+++ trunk/client/include/dialogs_g.h    Sun Nov 20 23:29:27 2016
@@ -47,6 +47,9 @@
 GUI_FUNC_PROTO(void, races_toggles_set_sensitive, void)
 GUI_FUNC_PROTO(void, races_update_pickable, bool nationset_change)
 
+GUI_FUNC_PROTO(void, popup_combat_info, int attacker_unit_id,
+               int defender_unit_id, int attacker_hp, int defender_hp,
+               bool make_winner_veteran)
 GUI_FUNC_PROTO(void, popup_action_selection, struct unit *actor_unit,
                struct city *target_city, struct unit *target_unit,
                struct tile *target_tile,

Modified: trunk/client/packhand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/packhand.c?rev=34596&r1=34595&r2=34596&view=diff
==============================================================================
--- trunk/client/packhand.c     (original)
+++ trunk/client/packhand.c     Sun Nov 20 23:29:27 2016
@@ -528,6 +528,8 @@
       refresh_unit_mapcanvas(pwinner, unit_tile(pwinner), TRUE, FALSE);
     }
   }
+  popup_combat_info(attacker_unit_id, defender_unit_id, attacker_hp,
+                    defender_hp, make_winner_veteran);
 }
 
 /**************************************************************************


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to