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.
This commit is contained in:
parent
64d1ad97cf
commit
e2bf06d065
4 changed files with 26 additions and 0 deletions
|
@ -4,6 +4,8 @@ Version 1.7.1+svn:
|
|||
* 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)
|
||||
|
|
|
@ -95,6 +95,19 @@
|
|||
|
||||
[/column]
|
||||
|
||||
[column]
|
||||
grow_factor = 1
|
||||
horizontal_grow = "true"
|
||||
|
||||
[image]
|
||||
id = "victory"
|
||||
definition = "default"
|
||||
|
||||
label = "misc/laurel.png"
|
||||
[/image]
|
||||
|
||||
[/column]
|
||||
|
||||
[column]
|
||||
grow_factor = 1
|
||||
horizontal_grow = "true"
|
||||
|
|
|
@ -10,6 +10,8 @@ Version 1.7.1+svn:
|
|||
* 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
|
||||
|
|
|
@ -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 @@ void tcampaign_selection::pre_show(CVideo& /*video*/, twindow& window)
|
|||
|
||||
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue