summaryrefslogtreecommitdiff
path: root/src/gui/setup_colours.cpp
diff options
context:
space:
mode:
authorPhilipp Sehmisch <crush@themanaworld.org>2009-02-10 15:51:54 +0100
committerIra Rice <irarice@gmail.com>2009-02-10 12:35:51 -0700
commit243cd9b123069decdcbefa05d04517492efbc3ee (patch)
treec0d1600ddcce34dc9d5108e2206fb455562593e3 /src/gui/setup_colours.cpp
parent02e60b55b359002ae1f26f36b40f8fa78ea1a708 (diff)
downloadmana-243cd9b123069decdcbefa05d04517492efbc3ee.tar.gz
mana-243cd9b123069decdcbefa05d04517492efbc3ee.tar.bz2
mana-243cd9b123069decdcbefa05d04517492efbc3ee.tar.xz
mana-243cd9b123069decdcbefa05d04517492efbc3ee.zip
Fixed a compile error by using less awkward code
Diffstat (limited to 'src/gui/setup_colours.cpp')
-rw-r--r--src/gui/setup_colours.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/gui/setup_colours.cpp b/src/gui/setup_colours.cpp
index 49e08aeb..82499560 100644
--- a/src/gui/setup_colours.cpp
+++ b/src/gui/setup_colours.cpp
@@ -155,10 +155,10 @@ void Setup_Colours::action(const gcn::ActionEvent &event)
std::string msg;
if (ch == '<')
- msg = toString("@@|") +
+ msg = toString("@@|") +
_("This is what the color looks like") + "@@";
else
- msg = "##" + toString(ch) +
+ msg = "##" + toString(ch) +
_("This is what the color looks like");
mPreview->clearRows();
@@ -171,27 +171,21 @@ void Setup_Colours::action(const gcn::ActionEvent &event)
if (event.getId() == "slider_red")
{
- char buffer[30];
- std::sprintf(buffer, "%d", static_cast<int>(mRedSlider->getValue()));
- mRedText->setText(buffer);
+ mRedText->setText(toString(mRedSlider->getValue()));
updateColour();
return;
}
if (event.getId() == "slider_green")
{
- char buffer[30];
- std::sprintf(buffer, "%d", static_cast<int>(mGreenSlider->getValue()));
- mGreenText->setText(buffer);
+ mGreenText->setText(toString(mGreenSlider->getValue()));
updateColour();
return;
}
if (event.getId() == "slider_blue")
{
- char buffer[30];
- std::sprintf(buffer, "%d", static_cast<int>(mBlueSlider->getValue()));
- mBlueText->setText(buffer);
+ mBlueText->setText(toString(mBlueSlider->getValue()));
updateColour();
return;
}