GUI: U32: Convert majority of code to use U32
This commit also includes some additional major changes. - Return U32String from TransMan getTranslation() - Change tooltips to be U32Strings - Remove temporary code of convertToU32String - U32 Support various dialogs (Browser, FileBrowser, Messages, Chooser, etc) - U32 for music plugins - U32 for OSD messages - Add some helper functions to ustr.cpp - Change default tooltips from nullptr & 0 -> "" - Some runtime exceptions may occur when changing languages due to incorrect String::Format
This commit is contained in:
parent
aa33fc2354
commit
f800ca4ada
91 changed files with 836 additions and 714 deletions
|
@ -785,7 +785,7 @@ void OpenGLGraphicsManager::setCursorPalette(const byte *colors, uint start, uin
|
|||
updateCursorPalette();
|
||||
}
|
||||
|
||||
void OpenGLGraphicsManager::displayMessageOnOSD(const char *msg) {
|
||||
void OpenGLGraphicsManager::displayMessageOnOSD(const Common::U32String &msg) {
|
||||
#ifdef USE_OSD
|
||||
_osdMessageChangeRequest = true;
|
||||
|
||||
|
@ -796,8 +796,8 @@ void OpenGLGraphicsManager::displayMessageOnOSD(const char *msg) {
|
|||
#ifdef USE_OSD
|
||||
void OpenGLGraphicsManager::osdMessageUpdateSurface() {
|
||||
// Split up the lines.
|
||||
Common::Array<Common::String> osdLines;
|
||||
Common::StringTokenizer tokenizer(_osdMessageNextData, "\n");
|
||||
Common::Array<Common::U32String> osdLines;
|
||||
Common::StringTokenizer tokenizer(Common::convertFromU32String(_osdMessageNextData), "\n");
|
||||
while (!tokenizer.empty()) {
|
||||
osdLines.push_back(tokenizer.nextToken());
|
||||
}
|
||||
|
@ -857,7 +857,7 @@ void OpenGLGraphicsManager::osdMessageUpdateSurface() {
|
|||
ConfMan.getBool("tts_enabled", "scummvm")) {
|
||||
Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager();
|
||||
if (ttsMan)
|
||||
ttsMan->say(_osdMessageNextData);
|
||||
ttsMan->say(Common::convertFromU32String(_osdMessageNextData));
|
||||
}
|
||||
#endif // USE_TTS
|
||||
// Clear the text update request
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue