mail[Wesnoth-commits] r36605 - in /trunk: ./ data/gui/default/window/ src/gui/dialogs/


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by koraq on July 05, 2009 - 11:53:
Author: mordante
Date: Sun Jul  5 11:53:58 2009
New Revision: 36605

URL: http://svn.gna.org/viewcvs/wesnoth?rev=36605&view=rev
Log:
Add a completion icon to the campaign.

This proof of concept version shows whether or not the user finished a
campaign. The UI needs more polishing, using the soon-to-be-committed stacked
widet.

Modified:
    trunk/changelog
    trunk/data/gui/default/window/campaign_dialog.cfg
    trunk/players_changelog
    trunk/src/gui/dialogs/campaign_selection.cpp

Modified: trunk/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=36605&r1=36604&r2=36605&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Sun Jul  5 11:53:58 2009
@@ -4,6 +4,8 @@
     * New portrait for female Footpad.
  * Language and i18n:
    * Updated translations: Finnish, German, Lithuanian, Polish, Serbian
+ * User interface:
+   * Add an icon to show whether or not the user finished a campaign
  * Miscellaneous and bugfixes:
    * Fixed language switch not affecting unit descriptions (bug #13827)
    * Fixed teleporting to impassable terrain (bug #13795)

Modified: trunk/data/gui/default/window/campaign_dialog.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/gui/default/window/campaign_dialog.cfg?rev=36605&r1=36604&r2=36605&view=diff
==============================================================================
--- trunk/data/gui/default/window/campaign_dialog.cfg (original)
+++ trunk/data/gui/default/window/campaign_dialog.cfg Sun Jul  5 11:53:58 2009
@@ -99,6 +99,19 @@
                                                                              
                                                  grow_factor = 1
                                                                              
                                                  horizontal_grow = "true"
 
+                                                                             
                                                  [image]
+                                                                             
                                                          id = "victory"
+                                                                             
                                                          definition = 
"default"
+
+                                                                             
                                                          label = 
"misc/laurel.png"
+                                                                             
                                                  [/image]
+
+                                                                             
                                          [/column]
+
+                                                                             
                                          [column]
+                                                                             
                                                  grow_factor = 1
+                                                                             
                                                  horizontal_grow = "true"
+
                                                                              
                                                  border = "right"
                                                                              
                                                  border_size = 8
 

Modified: trunk/players_changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/players_changelog?rev=36605&r1=36604&r2=36605&view=diff
==============================================================================
--- trunk/players_changelog (original)
+++ trunk/players_changelog Sun Jul  5 11:53:58 2009
@@ -10,6 +10,8 @@
   * Language and translations
     * Updated translations: Finnish, German, Lithuanian, Polish, Serbian.
 
+  * User interface
+    * Add an icon to show whether or not the user finished a campaign.
 
 Version 1.7.1:
   * Campaigns

Modified: trunk/src/gui/dialogs/campaign_selection.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/dialogs/campaign_selection.cpp?rev=36605&r1=36604&r2=36605&view=diff
==============================================================================
--- trunk/src/gui/dialogs/campaign_selection.cpp (original)
+++ trunk/src/gui/dialogs/campaign_selection.cpp Sun Jul  5 11:53:58 2009
@@ -24,6 +24,7 @@
 #include "gui/widgets/scroll_label.hpp"
 #include "gui/widgets/settings.hpp"
 #include "gui/widgets/window.hpp"
+#include "serialization/string_utils.hpp"
 
 namespace gui2 {
 
@@ -87,6 +88,14 @@
 
                list->add_row(list_item_item);
 
+               tgrid* grid = list->get_row_grid(list->get_item_count() - 1);
+               assert(grid);
+
+               twidget* widget = grid->find_widget("victory", false);
+               if(widget && !utils::string_bool(c["completed"], false)) {
+                       widget->set_visible(twidget::HIDDEN);
+               }
+
                /*** Add detail item ***/
                string_map detail_item;
                std::map<std::string, string_map> detail_page;




Related Messages


Powered by MHonArc, Updated Sun Jul 05 12:00:11 2009