Latest fixes for multilingual support.
This commit is contained in:
@@ -125,16 +125,21 @@ bool character_dialog_play_word_sound_sequence(const string& in message) {
|
||||
}
|
||||
|
||||
bool character_dialog_repeat_requested() {
|
||||
if (key_down(KEY_RETURN) || key_down(KEY_NUMPAD_ENTER) || key_down(KEY_ESCAPE) || key_down(KEY_AC_BACK)) {
|
||||
key_code[] @pressedKeys = keys_pressed();
|
||||
if (@pressedKeys is null || pressedKeys.length() == 0)
|
||||
return false;
|
||||
|
||||
for (uint keyIndex = 0; keyIndex < pressedKeys.length(); keyIndex++) {
|
||||
int keyCode = pressedKeys[keyIndex];
|
||||
if (keyCode == KEY_RETURN || keyCode == KEY_NUMPAD_ENTER || keyCode == KEY_ESCAPE || keyCode == KEY_AC_BACK)
|
||||
continue;
|
||||
return true;
|
||||
}
|
||||
|
||||
return total_keys_down() > 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
int character_dialog_wait_for_action(const string& in currentLine, bool interrupt) {
|
||||
bool keyHeld = false;
|
||||
|
||||
while (true) {
|
||||
wait(5);
|
||||
|
||||
@@ -148,12 +153,7 @@ int character_dialog_wait_for_action(const string& in currentLine, bool interrup
|
||||
|
||||
bool repeatRequested = character_dialog_repeat_requested();
|
||||
if (repeatRequested) {
|
||||
if (!keyHeld) {
|
||||
character_dialog_speak(currentLine, interrupt);
|
||||
keyHeld = true;
|
||||
}
|
||||
} else {
|
||||
keyHeld = false;
|
||||
character_dialog_speak(currentLine, interrupt);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +178,7 @@ bool character_dialog_show_lines(const string[] @dialogLines, bool interrupt = t
|
||||
|
||||
string displayLine = currentLine;
|
||||
if (characterDialogShowUsageInstructions && !characterDialogUsageInstructionsShown) {
|
||||
displayLine += "\nPress enter to continue, escape to skip, or any other key to repeat.";
|
||||
displayLine += " Press enter to continue, escape to skip, or any other key to repeat.";
|
||||
characterDialogUsageInstructionsShown = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user