summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-02-20 00:25:42 +0200
committerAndrei Karas <akaras@inbox.ru>2011-02-20 00:25:42 +0200
commit3f00faa305201fabcc74e17dc24da4cefa9dbfa5 (patch)
tree460a7a06c97912e5ed9a525f01624748dd7a16a6 /src/gui
parentda9ec0b7b8e061b3d3bf1d145284de9d778456c1 (diff)
downloadmv-3f00faa305201fabcc74e17dc24da4cefa9dbfa5.tar.gz
mv-3f00faa305201fabcc74e17dc24da4cefa9dbfa5.tar.bz2
mv-3f00faa305201fabcc74e17dc24da4cefa9dbfa5.tar.xz
mv-3f00faa305201fabcc74e17dc24da4cefa9dbfa5.zip
Fix some code style and some errors.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/minimap.cpp2
-rw-r--r--src/gui/ministatus.cpp3
-rw-r--r--src/gui/setup_other.cpp42
-rw-r--r--src/gui/textpopup.h6
-rw-r--r--src/gui/widgets/browserbox.cpp2
-rw-r--r--src/gui/widgets/mouseevent.h6
6 files changed, 24 insertions, 37 deletions
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp
index 94ce4f806..3eaf760a7 100644
--- a/src/gui/minimap.cpp
+++ b/src/gui/minimap.cpp
@@ -121,7 +121,7 @@ void Minimap::setMap(Map *map)
for (int y = 0; y < surface->h; y ++)
{
for (int x = 0; x < surface->w; x ++)
- *(data ++) = -map->getWalk(x,y);
+ *(data ++) = -map->getWalk(x, y);
}
SDL_UnlockSurface(surface);
diff --git a/src/gui/ministatus.cpp b/src/gui/ministatus.cpp
index e097c4246..303b36ae3 100644
--- a/src/gui/ministatus.cpp
+++ b/src/gui/ministatus.cpp
@@ -154,7 +154,7 @@ ProgressBar *MiniStatusWindow::createBar(float progress, int width, int height,
void MiniStatusWindow::updateBars()
{
- int x = 0, h = 0;
+ int x = 0;
std::list <ProgressBar*>::iterator it, it_end;
ProgressBar* lastBar = 0;
for (it = mBars.begin(), it_end = mBars.end(); it != it_end; ++it)
@@ -169,7 +169,6 @@ void MiniStatusWindow::updateBars()
bar->setPosition(x, 3);
add(bar);
x += bar->getWidth() + 3;
- h = bar->getHeight();
lastBar = bar;
}
}
diff --git a/src/gui/setup_other.cpp b/src/gui/setup_other.cpp
index be5f31665..7a43b5480 100644
--- a/src/gui/setup_other.cpp
+++ b/src/gui/setup_other.cpp
@@ -146,60 +146,46 @@ Setup_Other::Setup_Other():
mAfkButton = new Button(_("Edit"), ACTION_EDIT_AFK, this);
mTradeBotCheckBox = new CheckBox(_("Enable shop mode"),
- mTradeBot,
- this, ACTION_TRADEBOT);
+ mTradeBot, this, ACTION_TRADEBOT);
mBuggyServersCheckBox = new CheckBox(_("Enable buggy servers protection"),
- mBuggyServers,
- this, ACTION_BUGGY_SERVERS);
+ mBuggyServers, this, ACTION_BUGGY_SERVERS);
mDebugLogCheckBox = new CheckBox(_("Enable debug log"),
- mDebugLog,
- this, ACTION_DEBUG_LOG);
+ mDebugLog, this, ACTION_DEBUG_LOG);
mServerAttackCheckBox = new CheckBox(_("Enable server side attack"),
- mServerAttack,
- this, ACTION_SERVER_ATTACK);
+ mServerAttack, this, ACTION_SERVER_ATTACK);
mAutofixPosCheckBox = new CheckBox(_("Auto fix position"),
- mAutofixPos,
- this, ACTION_FIX_POS);
+ mAutofixPos, this, ACTION_FIX_POS);
mAttackMovingCheckBox = new CheckBox(_("Attack while moving"),
- mAttackMoving,
- this, ACTION_ATTACK_MOVING);
+ mAttackMoving, this, ACTION_ATTACK_MOVING);
mQuickStatsCheckBox = new CheckBox(_("Enable quick stats"),
- mQuickStats,
- this, ACTION_QUICK_STATS);
+ mQuickStats, this, ACTION_QUICK_STATS);
mWarpParticleCheckBox = new CheckBox(_("Show warps particles"),
- mWarpParticle,
- this, ACTION_WARP_PARTICLE);
+ mWarpParticle, this, ACTION_WARP_PARTICLE);
mAutoShopCheckBox = new CheckBox(_("Accept sell/buy requests"),
- mAutoShop,
- this, ACTION_AUTO_SHOP);
+ mAutoShop, this, ACTION_AUTO_SHOP);
mShowMobHPCheckBox = new CheckBox(_("Show monster hp bar"),
- mShowMobHP,
- this, ACTION_SHOW_MOB_HP);
+ mShowMobHP, this, ACTION_SHOW_MOB_HP);
mShowOwnHPCheckBox = new CheckBox(_("Show own hp bar"),
- mShowOwnHP,
- this, ACTION_SHOW_OWN_HP);
+ mShowOwnHP, this, ACTION_SHOW_OWN_HP);
mShowJobExpCheckBox = new CheckBox(_("Show job exp messages"),
- mShowJobExp,
- this, ACTION_SHOW_JOB_EXP);
+ mShowJobExp, this, ACTION_SHOW_JOB_EXP);
mShowBeingPopupCheckBox = new CheckBox(_("Show players popups"),
- mShowBeingPopup,
- this, ACTION_SHOW_BEING_POPUP);
+ mShowBeingPopup, this, ACTION_SHOW_BEING_POPUP);
mShowExtMinimapsCheckBox = new CheckBox(_("Show extended minimaps"),
- mShowExtMinimaps,
- this, ACTION_SHOW_EXTENDED_MINIMAPS);
+ mShowExtMinimaps, this, ACTION_SHOW_EXTENDED_MINIMAPS);
// Do the layout
LayoutHelper h(this);
diff --git a/src/gui/textpopup.h b/src/gui/textpopup.h
index 07662a0f7..898b53555 100644
--- a/src/gui/textpopup.h
+++ b/src/gui/textpopup.h
@@ -51,8 +51,10 @@ class TextPopup : public Popup
* Sets the text to be displayed.
*/
void show(int x, int y, const std::string &str1)
- { show(x, y, str1, static_cast<const char*>(""),
- static_cast<const char*>("")); };
+ {
+ show(x, y, str1, static_cast<const char*>(""),
+ static_cast<const char*>(""));
+ };
/**
* Sets the text to be displayed.
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index d2d908b95..eaeed4d06 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -244,7 +244,7 @@ struct MouseOverLink
MouseOverLink(int x, int y) : mX(x), mY(y)
{ }
- bool operator() (BROWSER_LINK &link)
+ bool operator() (BROWSER_LINK &link) const
{
return (mX >= link.x1 && mX < link.x2 &&
mY >= link.y1 && mY < link.y2);
diff --git a/src/gui/widgets/mouseevent.h b/src/gui/widgets/mouseevent.h
index 774132d79..5e9a46cfd 100644
--- a/src/gui/widgets/mouseevent.h
+++ b/src/gui/widgets/mouseevent.h
@@ -29,9 +29,9 @@ class MouseEvent : public gcn::MouseEvent
{
public:
MouseEvent(gcn::Widget* source, bool isShiftPressed,
- bool isControlPressed, bool isAltPressed, bool isMetaPressed,
- unsigned int type, unsigned int button, int x, int y,
- int clickCount) :
+ bool isControlPressed, bool isAltPressed,
+ bool isMetaPressed, unsigned int type, unsigned int button,
+ int x, int y, int clickCount) :
gcn::MouseEvent(source, isShiftPressed, isControlPressed,
isAltPressed, isMetaPressed, type, button, x, y,
clickCount)