summaryrefslogtreecommitdiffstats
path: root/src/ui/displaytext.cpp
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2014-07-02 11:33:47 +0200
committerDidier Raboud <odyx@debian.org>2014-07-02 11:33:47 +0200
commit2e136acd34c45e5e6d105cabf91c67e5865c38fe (patch)
tree8561603160cce0b41ba31250539a22d37a2951de /src/ui/displaytext.cpp
parent562be6fe765d7742f7c38fbd82f8cc26369e238b (diff)
parentd9fee8b2adad613cf8c10d153cd5cd7b261b7863 (diff)
downloadcolobot-2e136acd34c45e5e6d105cabf91c67e5865c38fe.tar.gz
colobot-2e136acd34c45e5e6d105cabf91c67e5865c38fe.tar.bz2
colobot-2e136acd34c45e5e6d105cabf91c67e5865c38fe.zip
Merge tag 'colobot-gold-0.1.3-alpha' into debian
Diffstat (limited to 'src/ui/displaytext.cpp')
-rw-r--r--src/ui/displaytext.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/ui/displaytext.cpp b/src/ui/displaytext.cpp
index d88674a..5b3144d 100644
--- a/src/ui/displaytext.cpp
+++ b/src/ui/displaytext.cpp
@@ -127,9 +127,6 @@ void CDisplayText::DisplayError(Error err, CObject* pObj, float time)
void CDisplayText::DisplayError(Error err, Math::Vector goal, float height,
float dist, float time)
{
- TextType type;
- char text[100];
-
if ( err == ERR_OK ) return;
#if 0
@@ -148,7 +145,7 @@ void CDisplayText::DisplayError(Error err, Math::Vector goal, float height,
type = TT_WARNING;
}
#else
- type = TT_WARNING;
+ TextType type = TT_WARNING;
if ( err >= INFO_FIRST )
{
type = TT_INFO;
@@ -164,8 +161,9 @@ void CDisplayText::DisplayError(Error err, Math::Vector goal, float height,
}
#endif
+ std::string text;
GetResource(RES_ERR, err, text);
- DisplayText(text, goal, height, dist, time, type);
+ DisplayText(text.c_str(), goal, height, dist, time, type);
}
// Displays text.