changes in parsing message texts
This commit is contained in:
parent
631db27920
commit
1e4fdcada6
5 changed files with 126 additions and 74 deletions
|
@ -31,13 +31,11 @@ void TextObject::setX(int x) {_x = x; }
|
|||
void TextObject::setY(int y) {_y = y; }
|
||||
void TextObject::setColor(Color *newcolor) { _fgColor = newcolor; }
|
||||
|
||||
std::string parseMsgText(char *msg, char *msgId);
|
||||
|
||||
void TextObject::draw() {
|
||||
const char *localString = g_localizer->localize(_textID).c_str();
|
||||
// This is also used for things like debugging in addition
|
||||
// to dialogue so there aren't always translations
|
||||
if (strrchr(localString, '/') != NULL) {
|
||||
g_driver->drawEmergString(_x, _y, strrchr(localString, '/') + 1, _fgColor);
|
||||
} else {
|
||||
g_driver->drawEmergString(_x, _y, localString, _fgColor);
|
||||
}
|
||||
char msgId[32];
|
||||
|
||||
std::string msg = parseMsgText(_textID, msgId);
|
||||
g_driver->drawEmergString(_x, _y, msg.c_str(), _fgColor);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue