diff options
author | Philipp Sehmisch <crush@themanaworld.org> | 2009-02-11 17:12:00 +0100 |
---|---|---|
committer | Philipp Sehmisch <crush@themanaworld.org> | 2009-02-11 17:12:00 +0100 |
commit | 3db37c9e66aca4736ee84a561fa855bd404ad29b (patch) | |
tree | 7c59f733776490d7c983a15894acb7c17f736159 /src/gui | |
parent | f262dbd28f08001d70416e3cc4e62273d3fee2cd (diff) | |
download | mana-3db37c9e66aca4736ee84a561fa855bd404ad29b.tar.gz mana-3db37c9e66aca4736ee84a561fa855bd404ad29b.tar.bz2 mana-3db37c9e66aca4736ee84a561fa855bd404ad29b.tar.xz mana-3db37c9e66aca4736ee84a561fa855bd404ad29b.zip |
Shut up some compiler warnings.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/color.cpp | 2 | ||||
-rw-r--r-- | src/gui/gui.cpp | 4 | ||||
-rw-r--r-- | src/gui/listbox.cpp | 2 | ||||
-rw-r--r-- | src/gui/progressbar.cpp | 2 | ||||
-rw-r--r-- | src/gui/shoplistbox.cpp | 2 | ||||
-rw-r--r-- | src/gui/table.cpp | 6 | ||||
-rw-r--r-- | src/gui/widgets/dropdown.cpp | 2 |
7 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/color.cpp b/src/gui/color.cpp index e37affda..e4372806 100644 --- a/src/gui/color.cpp +++ b/src/gui/color.cpp @@ -104,7 +104,7 @@ char Color::getColorCharAt(int i) void Color::addColor(const char c, const int rgb, const std::string &text) { - int trueRgb = config.getValue("color" + text, rgb); + int trueRgb = (int)config.getValue("color" + text, rgb); mColVector.push_back(colorElem(c, trueRgb, text)); } diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 87304bd1..a7946993 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -110,7 +110,7 @@ Gui::Gui(Graphics *graphics): std::string path = resman->getPath("fonts/dejavusans.ttf"); try { - const int fontSize = config.getValue("fontSize", 11); + const int fontSize = (int)config.getValue("fontSize", 11); mGuiFont = new TrueTypeFont(path, fontSize); } catch (gcn::Exception e) @@ -123,7 +123,7 @@ Gui::Gui(Graphics *graphics): path = resman->getPath("fonts/dejavusans-bold.ttf"); try { - const int fontSize = config.getValue("fontSize", 11); + const int fontSize = (int)config.getValue("fontSize", 11); boldFont = new TrueTypeFont(path, fontSize); } catch (gcn::Exception e) diff --git a/src/gui/listbox.cpp b/src/gui/listbox.cpp index 63e55e24..74d0b9ad 100644 --- a/src/gui/listbox.cpp +++ b/src/gui/listbox.cpp @@ -47,7 +47,7 @@ void ListBox::draw(gcn::Graphics *graphics) const int red = (textColor->getColor('H', valid) >> 16) & 0xFF; const int green = (textColor->getColor('H', valid) >> 8) & 0xFF; const int blue = textColor->getColor('H', valid) & 0xFF; - const int alpha = mAlpha * 255; + const int alpha = (int)(mAlpha * 255.0f); graphics->setColor(gcn::Color(red, green, blue, alpha)); graphics->setFont(getFont()); diff --git a/src/gui/progressbar.cpp b/src/gui/progressbar.cpp index 867477e0..c7ccfe39 100644 --- a/src/gui/progressbar.cpp +++ b/src/gui/progressbar.cpp @@ -116,7 +116,7 @@ void ProgressBar::draw(gcn::Graphics *graphics) static_cast<Graphics*>(graphics)-> drawImageRect(0, 0, getWidth(), getHeight(), mBorder); - const int alpha = mAlpha * 255; + const int alpha = (int)(mAlpha * 255.0f); // The bar if (mProgress > 0) { diff --git a/src/gui/shoplistbox.cpp b/src/gui/shoplistbox.cpp index 94187818..8aed3c77 100644 --- a/src/gui/shoplistbox.cpp +++ b/src/gui/shoplistbox.cpp @@ -67,7 +67,7 @@ void ShopListBox::draw(gcn::Graphics *gcnGraphics) const int red = (textColor->getColor('H', valid) >> 16) & 0xFF; const int green = (textColor->getColor('H', valid) >> 8) & 0xFF; const int blue = textColor->getColor('H', valid) & 0xFF; - const int alpha = mAlpha * 255; + const int alpha = (int)(mAlpha * 255.0f); Graphics *graphics = static_cast<Graphics*>(gcnGraphics); diff --git a/src/gui/table.cpp b/src/gui/table.cpp index 8dd546d9..567272f0 100644 --- a/src/gui/table.cpp +++ b/src/gui/table.cpp @@ -275,7 +275,7 @@ void GuiTable::draw(gcn::Graphics* graphics) const int red = getBackgroundColor().r; const int green = getBackgroundColor().g; const int blue = getBackgroundColor().b; - const int alpha = mAlpha * 255; + const int alpha = (int)(mAlpha * 255.0f); graphics->setColor(gcn::Color(red, green, blue, alpha)); graphics->fillRectangle(gcn::Rectangle(0, 0, getWidth(), getHeight())); } @@ -329,7 +329,7 @@ void GuiTable::draw(gcn::Graphics* graphics) const int green = (textColor->getColor('H', valid) >> 8) & 0xFF; const int blue = textColor->getColor('H', valid) & 0xFF; - const int alpha = mAlpha * 127; + const int alpha = (int)(mAlpha * 127.0f); graphics->setColor(gcn::Color(red, green, blue, alpha)); graphics->fillRectangle(bounds); @@ -351,7 +351,7 @@ void GuiTable::draw(gcn::Graphics* graphics) const int green = (textColor->getColor('H', valid) >> 8) & 0xFF; const int blue = textColor->getColor('H', valid) & 0xFF; - const int alpha = mAlpha * 127; + const int alpha = (int)(mAlpha * 127.0f); graphics->setColor(gcn::Color(red, green, blue, alpha)); graphics->fillRectangle(gcn::Rectangle(0, y_offset, diff --git a/src/gui/widgets/dropdown.cpp b/src/gui/widgets/dropdown.cpp index 29c6c69c..79d9ff06 100644 --- a/src/gui/widgets/dropdown.cpp +++ b/src/gui/widgets/dropdown.cpp @@ -135,7 +135,7 @@ void DropDown::draw(gcn::Graphics* graphics) } bool valid; - const int alpha = mAlpha * 255; + const int alpha = (int)(mAlpha * 255.0f); gcn::Color faceColor = getBaseColor(); faceColor.a = alpha; gcn::Color highlightColor = textColor->getColor('H', valid); |