diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-07-08 03:25:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-07-08 03:25:29 +0300 |
commit | a88d005220997d4c66d3a97ae8fd857a7dd3c307 (patch) | |
tree | cebc4b8388f33da27f24b727d2fe531e0f4acf2d /src/gui/setup_players.cpp | |
parent | 27c3646d10e0c5d25905d7afc7a43289159f711b (diff) | |
download | manaplus-a88d005220997d4c66d3a97ae8fd857a7dd3c307.tar.gz manaplus-a88d005220997d4c66d3a97ae8fd857a7dd3c307.tar.bz2 manaplus-a88d005220997d4c66d3a97ae8fd857a7dd3c307.tar.xz manaplus-a88d005220997d4c66d3a97ae8fd857a7dd3c307.zip |
Show players statuses near nicks.
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 407eca42a..67ec053ea 100644 --- a/src/gui/setup_players.cpp +++ b/src/gui/setup_players.cpp @@ -261,6 +261,7 @@ Setup_Players::Setup_Players(): mSecureTrades(config.getBoolValue("securetrades")), mUnsecureChars(config.getStringValue("unsecureChars")), mVisibleNamesEnabled(config.getBoolValue("visiblenames")), + mShowPlayersStatus(config.getBoolValue("showPlayersStatus")), mEditDialog(0) { setName(_("Players")); @@ -337,6 +338,11 @@ Setup_Players::Setup_Players(): mVisibleNamesCheckBox->setActionEventId("visiblenames"); mVisibleNamesCheckBox->addActionListener(this); + mShowPlayersStatusCheckBox = new CheckBox(_("Show statuses"), + mShowPlayersStatus); + mShowPlayersStatusCheckBox->setActionEventId("showPlayersStatus"); + mShowPlayersStatusCheckBox->addActionListener(this); + reset(); // Do the layout @@ -357,6 +363,7 @@ Setup_Players::Setup_Players(): place(3, 8, mSecureTradesCheckBox, 3); place(3, 9, mUnsecureCharsLabel, 3); place(3, 10, mUnsecureCharsField, 2); + place(3, 11, mShowPlayersStatusCheckBox, 2); place(5, 10, mUnsecureCharsButton, 1); place(0, 9, mWhisperTabCheckBox, 3).setPadding(4); place(0, 10, mTargetDeadCheckBox, 3).setPadding(4); @@ -415,6 +422,7 @@ void Setup_Players::apply() config.setValue("securetrades", mSecureTrades); config.setValue("unsecureChars", mUnsecureCharsField->getText()); config.setValue("visiblenames", mVisibleNamesEnabled); + config.setValue("showPlayersStatus", mShowPlayersStatus); if (actorSpriteManager) actorSpriteManager->updatePlayerNames(); @@ -441,6 +449,8 @@ void Setup_Players::cancel() mUnsecureCharsField->setText(mUnsecureChars); mVisibleNamesEnabled = config.getBoolValue("visiblenames"); mVisibleNamesCheckBox->setSelected(mVisibleNamesEnabled); + mShowPlayersStatus = config.getBoolValue("showPlayersStatus"); + mShowPlayersStatusCheckBox->setSelected(mShowPlayersStatus); } void Setup_Players::action(const gcn::ActionEvent &event) @@ -526,6 +536,10 @@ void Setup_Players::action(const gcn::ActionEvent &event) { mVisibleNamesEnabled = mVisibleNamesCheckBox->isSelected(); } + else if (event.getId() == "showPlayersStatus") + { + mShowPlayersStatus = mShowPlayersStatusCheckBox->isSelected(); + } } void Setup_Players::updatedPlayer(const std::string &name A_UNUSED) |