summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-20 18:32:41 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-20 21:40:23 +0300
commitf3850f2cf7f4428eed3be0efe9a7c440b9e4d950 (patch)
treecba59ab97c58ef387af91f7af9b7523b3d44c4f7 /src/gui
parent916433cb8ec57510af08fb5e1549076a7cb420d8 (diff)
downloadplus-f3850f2cf7f4428eed3be0efe9a7c440b9e4d950.tar.gz
plus-f3850f2cf7f4428eed3be0efe9a7c440b9e4d950.tar.bz2
plus-f3850f2cf7f4428eed3be0efe9a7c440b9e4d950.tar.xz
plus-f3850f2cf7f4428eed3be0efe9a7c440b9e4d950.zip
Fix code style.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/npcdialog.cpp4
-rw-r--r--src/gui/widgets/dropdown.cpp12
-rw-r--r--src/gui/widgets/dropdown.h2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp
index 71a884d88..aa86ffeec 100644
--- a/src/gui/npcdialog.cpp
+++ b/src/gui/npcdialog.cpp
@@ -697,7 +697,7 @@ void NpcDialog::setAvatarAction(int actionId)
{
Being *being = mPlayerBox->getBeing();
if (being)
- being->setAction((Being::Action)actionId);
+ being->setAction(static_cast<Being::Action>(actionId));
}
void NpcDialog::logic()
@@ -706,7 +706,7 @@ void NpcDialog::logic()
if (mShowAvatar && mAvatarBeing)
{
mAvatarBeing->logic();
- if (mPlayerBox->getWidth() < (signed)(3 * getPadding()))
+ if (mPlayerBox->getWidth() < static_cast<signed>(3 * getPadding()))
{
Sprite *sprite = mAvatarBeing->getSprite(0);
if (sprite)
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index 8b5f81e6b..a52f70926 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -45,7 +45,7 @@
int DropDown::instances = 0;
Image *DropDown::buttons[2][2];
-ImageRect DropDown::skin;
+ImageRect DropDown::skinRect;
float DropDown::mAlpha = 1.0;
static std::string const dropdownFiles[2] =
@@ -96,7 +96,7 @@ DropDown::DropDown(gcn::ListModel *listModel, gcn::ActionListener* listener,
// get the border skin
if (Theme::instance())
- Theme::instance()->loadRect(skin, "dropdown_background.xml");
+ Theme::instance()->loadRect(skinRect, "dropdown_background.xml");
}
instances++;
@@ -126,7 +126,7 @@ DropDown::~DropDown()
}
}
if (Theme::instance())
- Theme::instance()->unloadRect(skin);
+ Theme::instance()->unloadRect(skinRect);
}
delete mScrollArea;
mScrollArea = nullptr;
@@ -152,8 +152,8 @@ void DropDown::updateAlpha()
for (int a = 0; a < 9; a++)
{
- if (skin.grid[a])
- skin.grid[a]->setAlpha(mAlpha);
+ if (skinRect.grid[a])
+ skinRect.grid[a]->setAlpha(mAlpha);
}
}
}
@@ -208,7 +208,7 @@ void DropDown::drawFrame(gcn::Graphics *graphics)
const int w = getWidth() + bs * 2;
const int h = getHeight() + bs * 2;
- static_cast<Graphics*>(graphics)->drawImageRect(0, 0, w, h, skin);
+ static_cast<Graphics*>(graphics)->drawImageRect(0, 0, w, h, skinRect);
}
void DropDown::drawButton(gcn::Graphics *graphics)
diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h
index 5896042fa..c044e8a16 100644
--- a/src/gui/widgets/dropdown.h
+++ b/src/gui/widgets/dropdown.h
@@ -97,7 +97,7 @@ class DropDown : public gcn::DropDown
// Add own Images.
static int instances;
static Image *buttons[2][2];
- static ImageRect skin;
+ static ImageRect skinRect;
static float mAlpha;
};