summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/colorpage.cpp2
-rw-r--r--src/gui/widgets/dropdown.cpp2
-rw-r--r--src/gui/widgets/dropshortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/extendedlistbox.cpp2
-rw-r--r--src/gui/widgets/guitable.cpp4
-rw-r--r--src/gui/widgets/itemcontainer.cpp2
-rw-r--r--src/gui/widgets/itemshortcutcontainer.cpp6
-rw-r--r--src/gui/widgets/listbox.cpp2
-rw-r--r--src/gui/widgets/progressbar.cpp10
-rw-r--r--src/gui/widgets/progressbar.h2
-rw-r--r--src/gui/widgets/shoplistbox.cpp4
-rw-r--r--src/gui/widgets/skillinfo.cpp4
-rw-r--r--src/gui/widgets/spellshortcutcontainer.cpp2
-rw-r--r--src/gui/widgets/textpreview.cpp4
-rw-r--r--src/gui/widgets/window.cpp2
15 files changed, 25 insertions, 25 deletions
diff --git a/src/gui/widgets/colorpage.cpp b/src/gui/widgets/colorpage.cpp
index 2fb3a50bc..fce2227aa 100644
--- a/src/gui/widgets/colorpage.cpp
+++ b/src/gui/widgets/colorpage.cpp
@@ -52,7 +52,7 @@ void ColorPage::draw(gcn::Graphics *graphics)
mListModel);
Graphics *const g = static_cast<Graphics *const>(graphics);
- mHighlightColor.a = static_cast<int>(mAlpha * 255.0f);
+ mHighlightColor.a = static_cast<int>(mAlpha * 255.0F);
graphics->setColor(mHighlightColor);
updateAlpha();
gcn::Font *const font = getFont();
diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp
index 76ae575de..99438a2ce 100644
--- a/src/gui/widgets/dropdown.cpp
+++ b/src/gui/widgets/dropdown.cpp
@@ -225,7 +225,7 @@ void DropDown::draw(gcn::Graphics* graphics)
updateAlpha();
- const int alpha = static_cast<int>(mAlpha * 255.0f);
+ const int alpha = static_cast<int>(mAlpha * 255.0F);
const int pad = 2 * mPadding;
mHighlightColor.a = alpha;
mShadowColor.a = alpha;
diff --git a/src/gui/widgets/dropshortcutcontainer.cpp b/src/gui/widgets/dropshortcutcontainer.cpp
index 5f1364fc7..115fcb192 100644
--- a/src/gui/widgets/dropshortcutcontainer.cpp
+++ b/src/gui/widgets/dropshortcutcontainer.cpp
@@ -139,7 +139,7 @@ void DropShortcutContainer::draw(gcn::Graphics *graphics)
else if (item->isEquipped())
caption = "Eq.";
- image->setAlpha(1.0f);
+ image->setAlpha(1.0F);
g->drawImage(image, itemX, itemY);
if (item->isEquipped())
g->setColorAll(mEquipedColor, mEquipedColor2);
diff --git a/src/gui/widgets/extendedlistbox.cpp b/src/gui/widgets/extendedlistbox.cpp
index cdfafc480..45497ae0a 100644
--- a/src/gui/widgets/extendedlistbox.cpp
+++ b/src/gui/widgets/extendedlistbox.cpp
@@ -125,7 +125,7 @@ void ExtendedListBox::draw(gcn::Graphics *graphics)
if (minY != -1)
{
- mHighlightColor.a = static_cast<int>(mAlpha * 255.0f);
+ mHighlightColor.a = static_cast<int>(mAlpha * 255.0F);
graphics->setColor(mHighlightColor);
graphics->fillRectangle(gcn::Rectangle(mPadding, minY + mPadding,
width - pad2, maxY - minY + height));
diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp
index 42e68db55..96aabc873 100644
--- a/src/gui/widgets/guitable.cpp
+++ b/src/gui/widgets/guitable.cpp
@@ -308,7 +308,7 @@ void GuiTable::draw(gcn::Graphics* graphics)
const int y = rect.y;
if (mOpaque)
{
- mBackgroundColor.a = static_cast<int>(mAlpha * 255.0f);
+ mBackgroundColor.a = static_cast<int>(mAlpha * 255.0F);
graphics->setColor(mBackgroundColor);
graphics->fillRectangle(gcn::Rectangle(0, 0, width, height));
}
@@ -359,7 +359,7 @@ void GuiTable::draw(gcn::Graphics* graphics)
if (mSelectedRow > 0)
{
- mHighlightColor.a = static_cast<int>(mAlpha * 255.0f);
+ mHighlightColor.a = static_cast<int>(mAlpha * 255.0F);
graphics->setColor(mHighlightColor);
if (mLinewiseMode && r == static_cast<unsigned>(
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 5151e44fd..0def0ad9e 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -279,7 +279,7 @@ void ItemContainer::draw(gcn::Graphics *graphics)
if (mSelImg)
g->drawImage(mSelImg, itemX, itemY);
}
- image->setAlpha(1.0f); // ensure the image if fully drawn...
+ image->setAlpha(1.0F); // ensure the image if fully drawn...
g->drawImage(image, itemX + mPaddingItemX,
itemY + mPaddingItemY);
if (mProtectedImg && PlayerInfo::isItemProtected(
diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp
index 554be07c1..3334a42e5 100644
--- a/src/gui/widgets/itemshortcutcontainer.cpp
+++ b/src/gui/widgets/itemshortcutcontainer.cpp
@@ -169,7 +169,7 @@ void ItemShortcutContainer::draw(gcn::Graphics *graphics)
else if (item->isEquipped())
caption = "Eq.";
- image->setAlpha(1.0f);
+ image->setAlpha(1.0F);
g->drawImage(image, itemX, itemY);
if (item->isEquipped())
g->setColorAll(mEquipedColor, mEquipedColor2);
@@ -193,7 +193,7 @@ void ItemShortcutContainer::draw(gcn::Graphics *graphics)
if (image)
{
- image->setAlpha(1.0f);
+ image->setAlpha(1.0F);
g->drawImage(image, itemX, itemY);
}
}
@@ -212,7 +212,7 @@ void ItemShortcutContainer::draw(gcn::Graphics *graphics)
if (image)
{
- image->setAlpha(1.0f);
+ image->setAlpha(1.0F);
g->drawImage(image, itemX, itemY);
}
diff --git a/src/gui/widgets/listbox.cpp b/src/gui/widgets/listbox.cpp
index 0889bac15..4dd1da8d9 100644
--- a/src/gui/widgets/listbox.cpp
+++ b/src/gui/widgets/listbox.cpp
@@ -92,7 +92,7 @@ void ListBox::draw(gcn::Graphics *graphics)
updateAlpha();
Graphics *const g = static_cast<Graphics*>(graphics);
- mHighlightColor.a = static_cast<int>(mAlpha * 255.0f);
+ mHighlightColor.a = static_cast<int>(mAlpha * 255.0F);
graphics->setColor(mHighlightColor);
gcn::Font *const font = getFont();
const int rowHeight = getRowHeight();
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp
index b5af0360d..b0972a314 100644
--- a/src/gui/widgets/progressbar.cpp
+++ b/src/gui/widgets/progressbar.cpp
@@ -57,8 +57,8 @@ ProgressBar::ProgressBar(const Widget2 *const widget, float progress,
mRedraw(true)
{
// The progress value is directly set at load time:
- if (mProgress > 1.0f || mProgress < 0.0f)
- mProgress = 1.0f;
+ if (mProgress > 1.0F || mProgress < 0.0F)
+ mProgress = 1.0F;
mForegroundColor = getThemeColor(Theme::PROGRESS_BAR);
addWidgetListener(this);
@@ -120,9 +120,9 @@ void ProgressBar::logic()
{
// Smoothly showing the progressbar changes.
if (mProgressToGo > mProgress)
- mProgress = std::min(1.0f, mProgress + 0.005f);
+ mProgress = std::min(1.0F, mProgress + 0.005F);
if (mProgressToGo < mProgress)
- mProgress = std::max(0.0f, mProgress - 0.005f);
+ mProgress = std::max(0.0F, mProgress - 0.005F);
}
BLOCK_END("ProgressBar::logic")
}
@@ -145,7 +145,7 @@ void ProgressBar::draw(gcn::Graphics *graphics)
void ProgressBar::setProgress(const float progress)
{
- const float p = std::min(1.0f, std::max(0.0f, progress));
+ const float p = std::min(1.0F, std::max(0.0F, progress));
mProgressToGo = p;
if (!mSmoothProgress)
diff --git a/src/gui/widgets/progressbar.h b/src/gui/widgets/progressbar.h
index 4d30c015d..e8d8986e7 100644
--- a/src/gui/widgets/progressbar.h
+++ b/src/gui/widgets/progressbar.h
@@ -49,7 +49,7 @@ class ProgressBar final : public gcn::Widget,
/**
* Constructor, initializes the progress with the given value.
*/
- ProgressBar(const Widget2 *const widget, float progress = 0.0f,
+ ProgressBar(const Widget2 *const widget, float progress = 0.0F,
const int width = 40, const int height = 7,
const int color = -1);
diff --git a/src/gui/widgets/shoplistbox.cpp b/src/gui/widgets/shoplistbox.cpp
index cd83d23db..f719d132e 100644
--- a/src/gui/widgets/shoplistbox.cpp
+++ b/src/gui/widgets/shoplistbox.cpp
@@ -93,7 +93,7 @@ void ShopListBox::draw(gcn::Graphics *gcnGraphics)
if (client->getGuiAlpha() != mAlpha)
mAlpha = client->getGuiAlpha();
- const int alpha = static_cast<int>(mAlpha * 255.0f);
+ const int alpha = static_cast<int>(mAlpha * 255.0F);
Graphics *graphics = static_cast<Graphics*>(gcnGraphics);
gcn::Font *const font = getFont();
@@ -153,7 +153,7 @@ void ShopListBox::draw(gcn::Graphics *gcnGraphics)
Image *const icon = item->getImage();
if (icon)
{
- icon->setAlpha(1.0f);
+ icon->setAlpha(1.0F);
graphics->drawImage(icon, mPadding, y + mPadding);
}
}
diff --git a/src/gui/widgets/skillinfo.cpp b/src/gui/widgets/skillinfo.cpp
index d71b88e85..48ead9c6c 100644
--- a/src/gui/widgets/skillinfo.cpp
+++ b/src/gui/widgets/skillinfo.cpp
@@ -37,7 +37,7 @@
SkillInfo::SkillInfo() :
skillLevel(),
skillExp(),
- progress(0.0f),
+ progress(0.0F),
color(),
dataMap(),
model(nullptr),
@@ -101,7 +101,7 @@ void SkillInfo::update()
else
{
skillExp.clear();
- progress = 0.0f;
+ progress = 0.0F;
}
color = Theme::getProgressColor(Theme::PROG_EXP, progress);
diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp
index 4319bd145..cf3fc937b 100644
--- a/src/gui/widgets/spellshortcutcontainer.cpp
+++ b/src/gui/widgets/spellshortcutcontainer.cpp
@@ -130,7 +130,7 @@ void SpellShortcutContainer::draw(gcn::Graphics *graphics)
if (image)
{
- image->setAlpha(1.0f);
+ image->setAlpha(1.0F);
g->drawImage(image, itemX, itemY);
}
}
diff --git a/src/gui/widgets/textpreview.cpp b/src/gui/widgets/textpreview.cpp
index f78c48894..bb31993bd 100644
--- a/src/gui/widgets/textpreview.cpp
+++ b/src/gui/widgets/textpreview.cpp
@@ -86,7 +86,7 @@ void TextPreview::draw(gcn::Graphics* graphics)
mAlpha = client->getGuiAlpha();
Graphics *const g = static_cast<Graphics*>(graphics);
- const int intAlpha = static_cast<int>(mAlpha * 255.0f);
+ const int intAlpha = static_cast<int>(mAlpha * 255.0F);
const int alpha = mTextAlpha ? intAlpha : 255;
if (mOpaque)
@@ -94,7 +94,7 @@ void TextPreview::draw(gcn::Graphics* graphics)
g->setColor(gcn::Color(static_cast<int>(mBGColor->r),
static_cast<int>(mBGColor->g),
static_cast<int>(mBGColor->b),
- static_cast<int>(mAlpha * 255.0f)));
+ static_cast<int>(mAlpha * 255.0F)));
g->fillRectangle(gcn::Rectangle(0, 0,
mDimension.width, mDimension.height));
}
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 8733bb737..12e2f74dd 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -1114,7 +1114,7 @@ int Window::getGuiAlpha() const
{
const float alpha = std::max(client->getGuiAlpha(),
Theme::instance()->getMinimumOpacity());
- return static_cast<int>(alpha * 255.0f);
+ return static_cast<int>(alpha * 255.0F);
}
Layout &Window::getLayout()