diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-10-16 01:58:12 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-10-16 01:58:12 +0300 |
commit | 036df13f60e4d5c4e30d92c09fa376c147a68e9c (patch) | |
tree | a976693604fb050bb0f81681621e797a8162f6c6 /src/gui/widgets/tabs/setup_players.cpp | |
parent | bdc9cb6d5886af2bf068bfb5ea37f724f0cecae6 (diff) | |
download | manaplus-036df13f60e4d5c4e30d92c09fa376c147a68e9c.tar.gz manaplus-036df13f60e4d5c4e30d92c09fa376c147a68e9c.tar.bz2 manaplus-036df13f60e4d5c4e30d92c09fa376c147a68e9c.tar.xz manaplus-036df13f60e4d5c4e30d92c09fa376c147a68e9c.zip |
Add option to show player name only for selected player.s20161017
Diffstat (limited to 'src/gui/widgets/tabs/setup_players.cpp')
-rw-r--r-- | src/gui/widgets/tabs/setup_players.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/gui/widgets/tabs/setup_players.cpp b/src/gui/widgets/tabs/setup_players.cpp index 0ed677af0..4f6daa272 100644 --- a/src/gui/widgets/tabs/setup_players.cpp +++ b/src/gui/widgets/tabs/setup_players.cpp @@ -51,9 +51,22 @@ static const char *const badgesList[] = N_("show at bottom"), }; +static const int visibleNamesListSize = 3; + +static const char *const visibleNamesList[] = +{ + // TRANSLATORS: visible name type + N_("hide"), + // TRANSLATORS: visible name type + N_("show"), + // TRANSLATORS: visible name type + N_("show on selection") +}; + Setup_Players::Setup_Players(const Widget2 *const widget) : SetupTabScroll(widget), - mBadgesList(new NamesModel) + mBadgesList(new NamesModel), + mVisibleNamesList(new NamesModel) { // TRANSLATORS: settings tab name setName(_("Players")); @@ -82,9 +95,12 @@ Setup_Players::Setup_Players(const Widget2 *const widget) : new SetupItemCheckBox(_("Target dead players"), "", "targetDeadPlayers", this, "targetDeadPlayersEvent"); + mVisibleNamesList->fillFromArray(&visibleNamesList[0], + visibleNamesListSize); // TRANSLATORS: settings option - new SetupItemCheckBox(_("Visible names"), "", - "visiblenames", this, "visiblenamesEvent"); + new SetupItemDropDown(_("Show player names"), "", + "visiblenames", this, "visiblenamesEvent", + mVisibleNamesList, 150); // TRANSLATORS: settings option new SetupItemCheckBox(_("Auto move names"), "", |