summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/setup_colours.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/setup_colours.cpp b/src/gui/setup_colours.cpp
index 82499560..f986fded 100644
--- a/src/gui/setup_colours.cpp
+++ b/src/gui/setup_colours.cpp
@@ -20,6 +20,7 @@
*/
#include <string>
+#include <cmath>
#include <guichan/listmodel.hpp>
#include <guichan/widgets/label.hpp>
@@ -171,21 +172,21 @@ void Setup_Colours::action(const gcn::ActionEvent &event)
if (event.getId() == "slider_red")
{
- mRedText->setText(toString(mRedSlider->getValue()));
+ mRedText->setText(toString(std::floor(mRedSlider->getValue())));
updateColour();
return;
}
if (event.getId() == "slider_green")
{
- mGreenText->setText(toString(mGreenSlider->getValue()));
+ mGreenText->setText(toString(std::floor(mGreenSlider->getValue())));
updateColour();
return;
}
if (event.getId() == "slider_blue")
{
- mBlueText->setText(toString(mBlueSlider->getValue()));
+ mBlueText->setText(toString(std::floor(mBlueSlider->getValue())));
updateColour();
return;
}