summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-07-03 16:04:56 +0300
committerAndrei Karas <akaras@inbox.ru>2011-07-03 16:04:56 +0300
commit634149ac7d248d2e078ee9707379a5056d31077e (patch)
tree59dcf717b69c7f70c832a86aa27b4bf5099a1a68
parent40db8c31b6d76d9ff6bb54f44a87fb4e73b1f2f6 (diff)
downloadplus-634149ac7d248d2e078ee9707379a5056d31077e.tar.gz
plus-634149ac7d248d2e078ee9707379a5056d31077e.tar.bz2
plus-634149ac7d248d2e078ee9707379a5056d31077e.tar.xz
plus-634149ac7d248d2e078ee9707379a5056d31077e.zip
Move some settings from video tab to other tabs.
-rw-r--r--src/gui/setup_other.cpp21
-rw-r--r--src/gui/setup_players.cpp14
-rw-r--r--src/gui/setup_players.h3
-rw-r--r--src/gui/setup_theme.cpp68
-rw-r--r--src/gui/setup_theme.h6
-rw-r--r--src/gui/setup_video.cpp179
-rw-r--r--src/gui/setup_video.h21
7 files changed, 123 insertions, 189 deletions
diff --git a/src/gui/setup_other.cpp b/src/gui/setup_other.cpp
index 07409ee80..1f5b254a1 100644
--- a/src/gui/setup_other.cpp
+++ b/src/gui/setup_other.cpp
@@ -123,6 +123,27 @@ Setup_Other::Setup_Other()
new SetupItemCheckBox(_("Enable debug log"), "",
"debugLog", this, "debugLogEvent");
+ new SetupItemCheckBox(_("Draw path"), "", "drawPath",
+ this, "drawPathEvent");
+
+ new SetupItemCheckBox(_("Show job"), "", "showJob",
+ this, "showJobEvent", false);
+
+ new SetupItemCheckBox(_("Log NPC dialogue"), "", "logNpcInGui",
+ this, "logNpcInGuiEvent");
+
+ new SetupItemCheckBox(_("Draw hotkeys on map"), "", "drawHotKeys",
+ this, "drawHotKeysEvent");
+
+ new SetupItemCheckBox(_("Sync player move"), "", "syncPlayerMove",
+ this, "syncPlayerMoveEvent");
+
+ new SetupItemCheckBox(_("Low traffic mode"), "", "lowTraffic",
+ this, "lowTrafficEvent");
+
+ new SetupItemCheckBox(_("Hide shield sprite"), "", "hideShield",
+ this, "hideShieldEvent");
+
setDimension(gcn::Rectangle(0, 0, 550, 350));
}
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_)
diff --git a/src/gui/setup_players.h b/src/gui/setup_players.h
index 8cad7a771..a13218a36 100644
--- a/src/gui/setup_players.h
+++ b/src/gui/setup_players.h
@@ -99,6 +99,9 @@ private:
gcn::TextField *mUnsecureCharsField;
gcn::Button *mUnsecureCharsButton;
std::string mUnsecureChars;
+ bool mVisibleNamesEnabled;
+
+ gcn::CheckBox *mVisibleNamesCheckBox;
EditDialog *mEditDialog;
};
diff --git a/src/gui/setup_theme.cpp b/src/gui/setup_theme.cpp
index 7b003f1ca..515e15611 100644
--- a/src/gui/setup_theme.cpp
+++ b/src/gui/setup_theme.cpp
@@ -100,13 +100,42 @@ public:
{ }
};
+const char *SIZE_NAME[6] =
+{
+ N_("Tiny (10)"),
+ N_("Small (11)"),
+ N_("Medium (12)"),
+ N_("Large (13)"),
+ N_("Big (14)"),
+ N_("Huge (15)"),
+};
+
+class FontSizeChoiceListModel : public gcn::ListModel
+{
+public:
+ virtual ~FontSizeChoiceListModel()
+ { }
+
+ virtual int getNumberOfElements()
+ { return 6; }
+
+ virtual std::string getElementAt(int i)
+ {
+ if (i >= getNumberOfElements() || i < 0)
+ return _("???");
+
+ return gettext(SIZE_NAME[i]);
+ }
+};
+
Setup_Theme::Setup_Theme():
mTheme(config.getValue("theme", config.getValue("selectedSkin", ""))),
mFont(config.getStringValue("font")),
mBoldFont(config.getStringValue("boldFont")),
mParticleFont(config.getStringValue("particleFont")),
mHelpFont(config.getStringValue("helpFont")),
- mSecureFont(config.getStringValue("secureFont"))
+ mSecureFont(config.getStringValue("secureFont")),
+ mFontSize(config.getIntValue("fontSize"))
{
setName(_("Theme"));
@@ -143,6 +172,12 @@ Setup_Theme::Setup_Theme():
mSecureFontDropDown->setActionEventId(ACTION_SECURE_FONT);
mSecureFontDropDown->addActionListener(this);
+ fontSizeLabel = new Label(_("Font size"));
+ mFontSizeListModel = new FontSizeChoiceListModel;
+ mFontSizeDropDown = new DropDown(mFontSizeListModel);
+ mFontSizeDropDown->setSelected(mFontSize - 10);
+ mFontSizeDropDown->adjustHeight();
+
std::string skin = Theme::getThemeName();
if (!skin.empty())
mThemeDropDown->setSelectedString(skin);
@@ -166,16 +201,18 @@ Setup_Theme::Setup_Theme():
place(0, 0, mThemeLabel, 10);
place(0, 1, mThemeDropDown, 6);
- place(0, 2, mFontLabel, 10);
- place(0, 3, mFontDropDown, 6);
- place(0, 4, mBoldFontLabel, 10);
- place(0, 5, mBoldFontDropDown, 6);
- place(0, 6, mParticleFontLabel, 10);
- place(0, 7, mParticleFontDropDown, 6);
- place(0, 8, mHelpFontLabel, 10);
- place(0, 9, mHelpFontDropDown, 6);
- place(0, 10, mSecureFontLabel, 10);
- place(0, 11, mSecureFontDropDown, 6);
+ place(0, 2, fontSizeLabel, 10);
+ place(0, 3, mFontSizeDropDown, 6);
+ place(0, 4, mFontLabel, 10);
+ place(0, 5, mFontDropDown, 6);
+ place(0, 6, mBoldFontLabel, 10);
+ place(0, 7, mBoldFontDropDown, 6);
+ place(0, 8, mParticleFontLabel, 10);
+ place(0, 9, mParticleFontDropDown, 6);
+ place(0, 10, mHelpFontLabel, 10);
+ place(0, 11, mHelpFontDropDown, 6);
+ place(0, 12, mSecureFontLabel, 10);
+ place(0, 13, mSecureFontDropDown, 6);
place.getCell().matchColWidth(0, 0);
place = h.getPlacer(0, 1);
@@ -190,6 +227,9 @@ Setup_Theme::~Setup_Theme()
delete mFontsModel;
mFontsModel = 0;
+
+ delete mFontSizeListModel;
+ mFontSizeListModel = 0;
}
void Setup_Theme::action(const gcn::ActionEvent &event)
@@ -241,19 +281,23 @@ void Setup_Theme::apply()
new OkDialog(_("Theme Changed"),
_("Restart your client for the change to take effect."));
}
+
config.setValue("selectedSkin", "");
config.setValue("theme", mTheme);
if (config.getValue("font", "dejavusans.ttf") != mFont
|| config.getValue("boldFont", "dejavusans-bold.ttf") != mBoldFont
|| config.getValue("particleFont", "dejavusans.ttf") != mParticleFont
|| config.getValue("helpFont", "dejavusansmono.ttf") != mHelpFont
- || config.getValue("secureFont", "dejavusansmono.ttf") != mSecureFont)
+ || config.getValue("secureFont", "dejavusansmono.ttf") != mSecureFont
+ || config.getIntValue("fontSize")
+ != static_cast<int>(mFontSizeDropDown->getSelected()) + 10)
{
config.setValue("font", "fonts/" + getFileName(mFont));
config.setValue("boldFont", "fonts/" + getFileName(mBoldFont));
config.setValue("particleFont", "fonts/" + getFileName(mParticleFont));
config.setValue("helpFont", "fonts/" + getFileName(mHelpFont));
config.setValue("secureFont", "fonts/" + getFileName(mSecureFont));
+ config.setValue("fontSize", mFontSizeDropDown->getSelected() + 10);
gui->updateFonts();
}
}
diff --git a/src/gui/setup_theme.h b/src/gui/setup_theme.h
index 7eba723eb..0d141c0a5 100644
--- a/src/gui/setup_theme.h
+++ b/src/gui/setup_theme.h
@@ -30,6 +30,7 @@
#include <guichan/actionlistener.hpp>
class FontsModel;
+class FontSizeChoiceListModel;
class EditDialog;
class DropDown;
class ThemesModel;
@@ -72,6 +73,11 @@ class Setup_Theme : public SetupTab
DropDown *mSecureFontDropDown;
std::string mSecureFont;
+ FontSizeChoiceListModel *mFontSizeListModel;
+ gcn::Label *fontSizeLabel;
+ int mFontSize;
+ gcn::DropDown *mFontSizeDropDown;
+
EditDialog *mEditDialog;
};
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp
index e6578d34f..38250bedc 100644
--- a/src/gui/setup_video.cpp
+++ b/src/gui/setup_video.cpp
@@ -189,34 +189,6 @@ int ModeListModel::getIndexOf(const std::string &widthXHeightMode)
return -1;
}
-const char *SIZE_NAME[6] =
-{
- N_("Tiny (10)"),
- N_("Small (11)"),
- N_("Medium (12)"),
- N_("Large (13)"),
- N_("Big (14)"),
- N_("Huge (15)"),
-};
-
-class FontSizeChoiceListModel : public gcn::ListModel
-{
-public:
- virtual ~FontSizeChoiceListModel()
- { }
-
- virtual int getNumberOfElements()
- { return 6; }
-
- virtual std::string getElementAt(int i)
- {
- if (i >= getNumberOfElements() || i < 0)
- return _("???");
-
- return gettext(SIZE_NAME[i]);
- }
-};
-
const char *OPENGL_NAME[3] =
{
N_("Software"),
@@ -304,20 +276,12 @@ Setup_Video::Setup_Video():
mOpenGLEnabled(config.getIntValue("opengl")),
mHwAccelEnabled(config.getBoolValue("hwaccel")),
mCustomCursorEnabled(config.getBoolValue("customcursor")),
- mVisibleNamesEnabled(config.getBoolValue("visiblenames")),
mParticleEffectsEnabled(config.getBoolValue("particleeffects")),
- mNPCLogEnabled(config.getBoolValue("logNpcInGui")),
mPickupChatEnabled(config.getBoolValue("showpickupchat")),
mPickupParticleEnabled(config.getBoolValue("showpickupparticle")),
mOpacity(config.getFloatValue("guialpha")),
mFps(config.getIntValue("fpslimit")),
mAltFps(config.getIntValue("altfpslimit")),
- mHideShieldSprite(config.getBoolValue("hideShield")),
- mLowTraffic(config.getBoolValue("lowTraffic")),
- mSyncPlayerMove(config.getBoolValue("syncPlayerMove")),
- mDrawHotKeys(config.getBoolValue("drawHotKeys")),
- mDrawPath(config.getBoolValue("drawPath")),
- mShowJob(serverConfig.getBoolValue("showJob")),
mAlphaCache(config.getBoolValue("alphaCache")),
mShowBackground(config.getBoolValue("showBackground")),
mSpeechMode(static_cast<Being::Speech>(
@@ -328,27 +292,14 @@ Setup_Video::Setup_Video():
mHwAccelCheckBox(new CheckBox(_("Hw acceleration"), mHwAccelEnabled)),
mCustomCursorCheckBox(new CheckBox(_("Custom cursor"),
mCustomCursorEnabled)),
- mVisibleNamesCheckBox(new CheckBox(_("Visible names"),
- mVisibleNamesEnabled)),
mParticleEffectsCheckBox(new CheckBox(_("Particle effects"),
mParticleEffectsEnabled)),
- mNPCLogCheckBox(new CheckBox(_("Log NPC dialogue"), mNPCLogEnabled)),
mPickupNotifyLabel(new Label(_("Show pickup notification"))),
// TRANSLATORS: Refers to "Show own name"
mPickupChatCheckBox(new CheckBox(_("in chat"), mPickupChatEnabled)),
// TRANSLATORS: Refers to "Show own name"
mPickupParticleCheckBox(new CheckBox(_("as particle"),
mPickupParticleEnabled)),
- mHideShieldSpriteCheckBox(new CheckBox(_("Hide shield sprite"),
- mHideShieldSprite)),
- mLowTrafficCheckBox(new CheckBox(_("Low traffic mode"),
- mLowTraffic)),
- mSyncPlayerMoveCheckBox(new CheckBox(_("Sync player move"),
- mSyncPlayerMove)),
- mDrawHotKeysCheckBox(new CheckBox(_("Draw hotkeys on map"),
- mDrawHotKeys)),
- mDrawPathCheckBox(new CheckBox(_("Draw path"), mDrawPath)),
- mShowJobCheckBox(new CheckBox(_("Show job"), mShowJob)),
mAlphaCacheCheckBox(new CheckBox(_("Enable opacity cache"), mAlphaCache)),
mShowBackgroundCheckBox(new CheckBox(_("Show background"),
mShowBackground)),
@@ -366,27 +317,23 @@ Setup_Video::Setup_Video():
mParticleDetail(3 - config.getIntValue("particleEmitterSkip")),
mParticleDetailSlider(new Slider(0, 3)),
mParticleDetailField(new Label),
- mFontSize(config.getIntValue("fontSize")),
mDialog(0)
{
setName(_("Video"));
ScrollArea *scrollArea = new ScrollArea(mModeList);
+ scrollArea->setWidth(150);
scrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
speechLabel = new Label(_("Overhead text"));
alphaLabel = new Label(_("Gui opacity"));
overlayDetailLabel = new Label(_("Ambient FX"));
particleDetailLabel = new Label(_("Particle detail"));
- fontSizeLabel = new Label(_("Font size"));
mOpenGLListModel = new OpenGLListModel;
mOpenGLDropDown = new DropDown(mOpenGLListModel),
mOpenGLDropDown->setSelected(mOpenGLEnabled);
- mFontSizeListModel = new FontSizeChoiceListModel;
- mFontSizeDropDown = new DropDown(mFontSizeListModel);
-
mModeList->setEnabled(true);
#ifndef USE_OPENGL
@@ -415,11 +362,9 @@ Setup_Video::Setup_Video():
mModeList->setActionEventId("videomode");
mCustomCursorCheckBox->setActionEventId("customcursor");
- mVisibleNamesCheckBox->setActionEventId("visiblenames");
mParticleEffectsCheckBox->setActionEventId("particleeffects");
mPickupChatCheckBox->setActionEventId("pickupchat");
mPickupParticleCheckBox->setActionEventId("pickupparticle");
- mNPCLogCheckBox->setActionEventId("lognpc");
mAlphaSlider->setActionEventId("guialpha");
mFpsCheckBox->setActionEventId("fpslimitcheckbox");
mSpeechSlider->setActionEventId("speech");
@@ -429,22 +374,14 @@ Setup_Video::Setup_Video():
mOverlayDetailField->setActionEventId("overlaydetailfield");
mParticleDetailSlider->setActionEventId("particledetailslider");
mParticleDetailField->setActionEventId("particledetailfield");
- mHideShieldSpriteCheckBox->setActionEventId("hideshieldsprite1");
- mLowTrafficCheckBox->setActionEventId("lowTraffic1");
- mSyncPlayerMoveCheckBox->setActionEventId("syncPlayerMove1");
- mDrawHotKeysCheckBox->setActionEventId("drawHotKeys");
- mDrawPathCheckBox->setActionEventId("drawPath1");
- mShowJobCheckBox->setActionEventId("showJob");
mAlphaCacheCheckBox->setActionEventId("alphaCache");
mOpenGLDropDown->setActionEventId("opengl");
mModeList->addActionListener(this);
mCustomCursorCheckBox->addActionListener(this);
- mVisibleNamesCheckBox->addActionListener(this);
mParticleEffectsCheckBox->addActionListener(this);
mPickupChatCheckBox->addActionListener(this);
mPickupParticleCheckBox->addActionListener(this);
- mNPCLogCheckBox->addActionListener(this);
mAlphaSlider->addActionListener(this);
mFpsCheckBox->addActionListener(this);
mSpeechSlider->addActionListener(this);
@@ -454,12 +391,6 @@ Setup_Video::Setup_Video():
mOverlayDetailField->addKeyListener(this);
mParticleDetailSlider->addActionListener(this);
mParticleDetailField->addKeyListener(this);
- mHideShieldSpriteCheckBox->addKeyListener(this);
- mLowTrafficCheckBox->addKeyListener(this);
- mSyncPlayerMoveCheckBox->addKeyListener(this);
- mDrawHotKeysCheckBox->addKeyListener(this);
- mDrawPathCheckBox->addKeyListener(this);
- mShowJobCheckBox->addKeyListener(this);
mOpenGLDropDown->addActionListener(this);
mAlphaCacheCheckBox->addKeyListener(this);
@@ -473,24 +404,21 @@ Setup_Video::Setup_Video():
mParticleDetailField->setCaption(particleDetailToString(mParticleDetail));
mParticleDetailSlider->setValue(mParticleDetail);
- mFontSizeDropDown->setSelected(mFontSize - 10);
- mFontSizeDropDown->adjustHeight();
-
// Do the layout
LayoutHelper h(this);
ContainerPlacer place = h.getPlacer(0, 0);
place(0, 0, scrollArea, 1, 5).setPadding(2);
- place(1, 0, mFsCheckBox, 2);
- place(3, 0, mOpenGLDropDown, 1);
+ place(0, 5, mOpenGLDropDown, 1);
- place(1, 1, mCustomCursorCheckBox, 3);
- place(3, 1, mHwAccelCheckBox, 1);
+ place(0, 6, mHwAccelCheckBox, 6);
+ place(0, 7, mAlphaCacheCheckBox, 6);
- place(1, 2, mVisibleNamesCheckBox, 3);
+ place(1, 0, mFsCheckBox, 2);
- place(3, 2, mAlphaCacheCheckBox, 4);
+ place(1, 1, mCustomCursorCheckBox, 3);
+ place(1, 2, mShowBackgroundCheckBox);
place(1, 3, mParticleEffectsCheckBox, 2);
place(1, 4, mPickupNotifyLabel, 4);
@@ -498,39 +426,27 @@ Setup_Video::Setup_Video():
place(1, 5, mPickupChatCheckBox, 1);
place(2, 5, mPickupParticleCheckBox, 2);
- place(0, 6, fontSizeLabel, 3);
- place(1, 6, mFontSizeDropDown, 1);
-
- place(0, 7, mAlphaSlider);
- place(1, 7, alphaLabel, 3);
+ place(0, 8, mAlphaSlider);
+ place(1, 8, alphaLabel, 3);
- place(0, 8, mFpsSlider);
- place(1, 8, mFpsCheckBox).setPadding(3);
- place(2, 8, mFpsLabel).setPadding(1);
+ place(0, 9, mFpsSlider);
+ place(1, 9, mFpsCheckBox).setPadding(3);
+ place(2, 9, mFpsLabel).setPadding(1);
- place(0, 9, mAltFpsSlider);
- place(1, 9, mAltFpsLabel).setPadding(3);
+ place(0, 10, mAltFpsSlider);
+ place(1, 10, mAltFpsLabel).setPadding(3);
- place(0, 10, mSpeechSlider);
- place(1, 10, speechLabel);
- place(2, 10, mSpeechLabel, 3).setPadding(2);
+ place(0, 11, mSpeechSlider);
+ place(1, 11, speechLabel);
+ place(2, 11, mSpeechLabel, 3).setPadding(2);
- place(0, 11, mOverlayDetailSlider);
- place(1, 11, overlayDetailLabel);
- place(2, 11, mOverlayDetailField, 3).setPadding(2);
+ place(0, 12, mOverlayDetailSlider);
+ place(1, 12, overlayDetailLabel);
+ place(2, 12, mOverlayDetailField, 3).setPadding(2);
- place(0, 12, mParticleDetailSlider);
- place(1, 12, particleDetailLabel);
- place(2, 12, mParticleDetailField, 3).setPadding(2);
-
- place(3, 7, mHideShieldSpriteCheckBox);
- place(3, 8, mLowTrafficCheckBox);
- place(0, 13, mShowBackgroundCheckBox);
- place(0, 14, mSyncPlayerMoveCheckBox);
- place(0, 15, mDrawHotKeysCheckBox);
- place(2, 13, mDrawPathCheckBox, 2);
- place(2, 14, mShowJobCheckBox, 2);
- place(2, 15, mNPCLogCheckBox, 2);
+ place(0, 13, mParticleDetailSlider);
+ place(1, 13, particleDetailLabel);
+ place(2, 13, mParticleDetailField, 3).setPadding(2);
int width = 600;
@@ -546,8 +462,6 @@ Setup_Video::~Setup_Video()
mModeListModel = 0;
delete mModeList;
mModeList = 0;
- delete mFontSizeListModel;
- mFontSizeListModel = 0;
delete mOpenGLListModel;
mOpenGLListModel = 0;
delete mDialog;
@@ -629,34 +543,13 @@ void Setup_Video::apply()
config.setValue("fpslimit", mFps);
config.setValue("altfpslimit", mAltFps);
- if (config.getIntValue("fontSize")
- != static_cast<int>(mFontSizeDropDown->getSelected()) + 10)
- {
- config.setValue("fontSize", mFontSizeDropDown->getSelected() + 10);
- gui->updateFonts();
- }
-
- config.setValue("hideShield", mHideShieldSpriteCheckBox->isSelected());
- config.setValue("lowTraffic", mLowTrafficCheckBox->isSelected());
- config.setValue("syncPlayerMove", mSyncPlayerMoveCheckBox->isSelected());
- config.setValue("drawHotKeys", mDrawHotKeysCheckBox->isSelected());
- config.setValue("drawPath", mDrawPathCheckBox->isSelected());
- serverConfig.setValue("showJob", mShowJobCheckBox->isSelected());
config.setValue("alphaCache", mAlphaCacheCheckBox->isSelected());
config.setValue("showBackground", mShowBackgroundCheckBox->isSelected());
// We sync old and new values at apply time
mFullScreenEnabled = config.getBoolValue("screen");
mCustomCursorEnabled = config.getBoolValue("customcursor");
- mVisibleNamesEnabled = config.getBoolValue("visiblenames");
mParticleEffectsEnabled = config.getBoolValue("particleeffects");
- mNPCLogEnabled = config.getBoolValue("logNpcInGui");
- mHideShieldSprite = config.getBoolValue("hideShield");
- mLowTraffic = config.getBoolValue("lowTraffic");
- mSyncPlayerMove = config.getBoolValue("syncPlayerMove");
- mDrawHotKeys = config.getBoolValue("drawHotKeys");
- mDrawPath = config.getBoolValue("drawPath");
- mShowJob = serverConfig.getBoolValue("showJob");
mAlphaCache = config.getBoolValue("alphaCache");
mShowBackground = config.getBoolValue("showBackground");
@@ -677,20 +570,12 @@ void Setup_Video::cancel()
mOpenGLDropDown->setSelected(mOpenGLEnabled);
mHwAccelCheckBox->setSelected(mHwAccelEnabled);
mCustomCursorCheckBox->setSelected(mCustomCursorEnabled);
- mVisibleNamesCheckBox->setSelected(mVisibleNamesEnabled);
mParticleEffectsCheckBox->setSelected(mParticleEffectsEnabled);
mFpsSlider->setValue(mFps);
mFpsSlider->setEnabled(mFps > 0);
mAltFpsSlider->setValue(mAltFps);
mAltFpsSlider->setEnabled(mAltFps > 0);
mSpeechSlider->setValue(mSpeechMode);
- mNPCLogCheckBox->setSelected(mNPCLogEnabled);
- mHideShieldSpriteCheckBox->setSelected(mHideShieldSprite);
- mLowTrafficCheckBox->setSelected(mLowTraffic);
- mSyncPlayerMoveCheckBox->setSelected(mSyncPlayerMove);
- mDrawHotKeysCheckBox->setSelected(mDrawHotKeys);
- mDrawPathCheckBox->setSelected(mDrawPath);
- mShowJobCheckBox->setSelected(mShowJob);
mAlphaCacheCheckBox->setSelected(mAlphaCache);
mShowBackgroundCheckBox->setSelected(mShowBackground);
mAlphaSlider->setValue(mOpacity);
@@ -710,16 +595,8 @@ void Setup_Video::cancel()
config.setValue("screenheight", graphics->mHeight);
config.setValue("customcursor", mCustomCursorEnabled);
- config.setValue("visiblenames", mVisibleNamesEnabled);
config.setValue("particleeffects", mParticleEffectsEnabled);
config.setValue("speech", static_cast<int>(mSpeechMode));
- config.setValue("logNpcInGui", mNPCLogEnabled);
- config.setValue("hideShield", mHideShieldSprite);
- config.setValue("lowTraffic", mLowTraffic);
- config.setValue("syncPlayerMove", mSyncPlayerMove);
- config.setValue("drawHotKeys", mDrawHotKeys);
- config.setValue("drawPath", mDrawPath);
- serverConfig.setValue("showJob", mShowJob);
config.setValue("alphaCache", mAlphaCache);
config.setValue("showBackground", mShowBackground);
config.setValue("guialpha", mOpacity);
@@ -794,10 +671,6 @@ void Setup_Video::action(const gcn::ActionEvent &event)
{
config.setValue("customcursor", mCustomCursorCheckBox->isSelected());
}
- else if (id == "visiblenames")
- {
- config.setValue("visiblenames", mVisibleNamesCheckBox->isSelected());
- }
else if (id == "particleeffects")
{
config.setValue("particleeffects",
@@ -827,10 +700,6 @@ void Setup_Video::action(const gcn::ActionEvent &event)
mSpeechSlider->setValue(val);
config.setValue("speech", static_cast<int>(val));
}
- else if (id == "lognpc")
- {
- config.setValue("logNpcInGui", mNPCLogCheckBox->isSelected());
- }
else if (id == "overlaydetailslider")
{
int val = static_cast<int>(mOverlayDetailSlider->getValue());
@@ -878,6 +747,4 @@ void Setup_Video::action(const gcn::ActionEvent &event)
void Setup_Video::externalUpdated()
{
- mShowJob = serverConfig.getBoolValue("showJob");
- mShowJobCheckBox->setSelected(mShowJob);
} \ No newline at end of file
diff --git a/src/gui/setup_video.h b/src/gui/setup_video.h
index a9271c65b..3f2ab09c8 100644
--- a/src/gui/setup_video.h
+++ b/src/gui/setup_video.h
@@ -31,7 +31,6 @@
#include <guichan/actionlistener.hpp>
#include <guichan/keylistener.hpp>
-class FontSizeChoiceListModel;
class ModeListModel;
class OpenGLListModel;
class TextDialog;
@@ -58,26 +57,17 @@ class Setup_Video : public SetupTab, public gcn::KeyListener
int mOpenGLEnabled;
bool mHwAccelEnabled;
bool mCustomCursorEnabled;
- bool mVisibleNamesEnabled;
bool mParticleEffectsEnabled;
- bool mNPCLogEnabled;
bool mPickupChatEnabled;
bool mPickupParticleEnabled;
float mOpacity;
int mFps;
int mAltFps;
- bool mHideShieldSprite;
- bool mLowTraffic;
- bool mSyncPlayerMove;
- bool mDrawHotKeys;
- bool mDrawPath;
- bool mShowJob;
bool mAlphaCache;
bool mShowBackground;
Being::Speech mSpeechMode;
ModeListModel *mModeListModel;
- FontSizeChoiceListModel *mFontSizeListModel;
OpenGLListModel *mOpenGLListModel;
@@ -87,27 +77,18 @@ class Setup_Video : public SetupTab, public gcn::KeyListener
gcn::Label *scrollLazinessLabel;
gcn::Label *overlayDetailLabel;
gcn::Label *particleDetailLabel;
- gcn::Label *fontSizeLabel;
gcn::ListBox *mModeList;
gcn::CheckBox *mFsCheckBox;
gcn::DropDown *mOpenGLDropDown;
gcn::CheckBox *mHwAccelCheckBox;
gcn::CheckBox *mCustomCursorCheckBox;
- gcn::CheckBox *mVisibleNamesCheckBox;
gcn::CheckBox *mParticleEffectsCheckBox;
- gcn::CheckBox *mNPCLogCheckBox;
gcn::Label *mPickupNotifyLabel;
gcn::CheckBox *mPickupChatCheckBox;
gcn::CheckBox *mPickupParticleCheckBox;
- gcn::CheckBox *mHideShieldSpriteCheckBox;
- gcn::CheckBox *mLowTrafficCheckBox;
- gcn::CheckBox *mSyncPlayerMoveCheckBox;
- gcn::CheckBox *mDrawHotKeysCheckBox;
- gcn::CheckBox *mDrawPathCheckBox;
- gcn::CheckBox *mShowJobCheckBox;
gcn::CheckBox *mAlphaCacheCheckBox;
gcn::CheckBox *mShowBackgroundCheckBox;
gcn::Slider *mSpeechSlider;
@@ -128,8 +109,6 @@ class Setup_Video : public SetupTab, public gcn::KeyListener
gcn::Slider *mParticleDetailSlider;
gcn::Label *mParticleDetailField;
- int mFontSize;
- gcn::DropDown *mFontSizeDropDown;
TextDialog *mDialog;
};