diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-07-03 16:04:56 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-07-03 16:04:56 +0300 |
commit | 634149ac7d248d2e078ee9707379a5056d31077e (patch) | |
tree | 59dcf717b69c7f70c832a86aa27b4bf5099a1a68 /src/gui/setup_players.cpp | |
parent | 40db8c31b6d76d9ff6bb54f44a87fb4e73b1f2f6 (diff) | |
download | manaverse-634149ac7d248d2e078ee9707379a5056d31077e.tar.gz manaverse-634149ac7d248d2e078ee9707379a5056d31077e.tar.bz2 manaverse-634149ac7d248d2e078ee9707379a5056d31077e.tar.xz manaverse-634149ac7d248d2e078ee9707379a5056d31077e.zip |
Move some settings from video tab to other tabs.
Diffstat (limited to 'src/gui/setup_players.cpp')
-rw-r--r-- | src/gui/setup_players.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/setup_players.cpp b/src/gui/setup_players.cpp index 2795ce223..453c2412c 100644 --- a/src/gui/setup_players.cpp +++ b/src/gui/setup_players.cpp @@ -260,6 +260,7 @@ Setup_Players::Setup_Players(): mTargetDead(config.getBoolValue("targetDeadPlayers")), mSecureTrades(config.getBoolValue("securetrades")), mUnsecureChars(config.getStringValue("unsecureChars")), + mVisibleNamesEnabled(config.getBoolValue("visiblenames")), mEditDialog(0) { setName(_("Players")); @@ -331,6 +332,11 @@ Setup_Players::Setup_Players(): true, this, ACTION_UNSECURE); mUnsecureCharsButton = new Button(_("Edit"), ACTION_EDIT_UNSECURE, this); + mVisibleNamesCheckBox = new CheckBox(_("Visible names"), + mVisibleNamesEnabled); + mVisibleNamesCheckBox->setActionEventId("visiblenames"); + mVisibleNamesCheckBox->addActionListener(this); + reset(); // Do the layout @@ -354,6 +360,7 @@ Setup_Players::Setup_Players(): place(5, 10, mUnsecureCharsButton, 1); place(0, 9, mWhisperTabCheckBox, 3).setPadding(4); place(0, 10, mTargetDeadCheckBox, 3).setPadding(4); + place(0, 11, mVisibleNamesCheckBox, 3).setPadding(4); player_relations.addListener(this); @@ -407,6 +414,7 @@ void Setup_Players::apply() config.setValue("showgender", mShowGender); config.setValue("securetrades", mSecureTrades); config.setValue("unsecureChars", mUnsecureCharsField->getText()); + config.setValue("visiblenames", mVisibleNamesEnabled); if (actorSpriteManager) actorSpriteManager->updatePlayerNames(); @@ -431,6 +439,8 @@ void Setup_Players::cancel() mSecureTradesCheckBox->setSelected(mSecureTrades); mUnsecureChars = config.getStringValue("unsecureChars"); mUnsecureCharsField->setText(mUnsecureChars); + mVisibleNamesEnabled = config.getBoolValue("visiblenames"); + mVisibleNamesCheckBox->setSelected(mVisibleNamesEnabled); } void Setup_Players::action(const gcn::ActionEvent &event) @@ -512,6 +522,10 @@ void Setup_Players::action(const gcn::ActionEvent &event) { mUnsecureChars = mUnsecureCharsField->getText(); } + else if (event.getId() == "visiblenames") + { + mVisibleNamesEnabled = mVisibleNamesCheckBox->isSelected(); + } } void Setup_Players::updatedPlayer(const std::string &name _UNUSED_) |