diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-07-29 14:33:37 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-07-29 14:33:37 +0300 |
commit | aae7a5ec7b6d962edd6620f1aedd468a6bc98e1a (patch) | |
tree | 4352a052e5254b0f16b56aab304dcb3ce107a59b /src/gui/widgets/tabs/setup_players.cpp | |
parent | cd2a71bfc4d3339dd6cf18b5a311e57d58fb548c (diff) | |
download | manaverse-aae7a5ec7b6d962edd6620f1aedd468a6bc98e1a.tar.gz manaverse-aae7a5ec7b6d962edd6620f1aedd468a6bc98e1a.tar.bz2 manaverse-aae7a5ec7b6d962edd6620f1aedd468a6bc98e1a.tar.xz manaverse-aae7a5ec7b6d962edd6620f1aedd468a6bc98e1a.zip |
Add ability to show badges under nick.
Add option for select how show badges.
Diffstat (limited to 'src/gui/widgets/tabs/setup_players.cpp')
-rw-r--r-- | src/gui/widgets/tabs/setup_players.cpp | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/src/gui/widgets/tabs/setup_players.cpp b/src/gui/widgets/tabs/setup_players.cpp index 82f8b0115..cd28c8d69 100644 --- a/src/gui/widgets/tabs/setup_players.cpp +++ b/src/gui/widgets/tabs/setup_players.cpp @@ -22,6 +22,8 @@ #include "gui/widgets/tabs/setup_players.h" +#include "gui/models/namesmodel.h" + #include "gui/widgets/containerplacer.h" #include "gui/widgets/layouthelper.h" #include "gui/widgets/scrollarea.h" @@ -31,8 +33,23 @@ #include "debug.h" +static const int badgesListSize = 4; + +static const char *const badgesList[] = +{ + // TRANSLATORS: screen badges type + N_("hide"), + // TRANSLATORS: screen badges type + N_("show at top"), + // TRANSLATORS: screen badges type + N_("show at right"), + // TRANSLATORS: screen badges type + N_("show at bottom"), +}; + Setup_Players::Setup_Players(const Widget2 *const widget) : - SetupTabScroll(widget) + SetupTabScroll(widget), + mBadgesList(new NamesModel) { // TRANSLATORS: settings tab name setName(_("Players")); @@ -69,13 +86,10 @@ Setup_Players::Setup_Players(const Widget2 *const widget) : new SetupItemCheckBox(_("Auto move names"), "", "moveNames", this, "moveNamesEvent"); + mBadgesList->fillFromArray(&badgesList[0], badgesListSize); // TRANSLATORS: settings option - new SetupItemCheckBox(_("Show badges"), "", - "showBadges", this, "showBadgesEvent"); - - // TRANSLATORS: settings option - new SetupItemCheckBox(_("Show badges at top"), "", - "showBadgesTop", this, "showBadgesTopEvent"); + new SetupItemDropDown(_("Badges"), "", + "showBadges", this, "showBadgesEvent", mBadgesList, 150); // TRANSLATORS: settings option new SetupItemCheckBox(_("Secure trades"), "", |