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() {
|
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;
|
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) {
|
int character_dialog_wait_for_action(const string& in currentLine, bool interrupt) {
|
||||||
bool keyHeld = false;
|
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
wait(5);
|
wait(5);
|
||||||
|
|
||||||
@@ -148,12 +153,7 @@ int character_dialog_wait_for_action(const string& in currentLine, bool interrup
|
|||||||
|
|
||||||
bool repeatRequested = character_dialog_repeat_requested();
|
bool repeatRequested = character_dialog_repeat_requested();
|
||||||
if (repeatRequested) {
|
if (repeatRequested) {
|
||||||
if (!keyHeld) {
|
character_dialog_speak(currentLine, interrupt);
|
||||||
character_dialog_speak(currentLine, interrupt);
|
|
||||||
keyHeld = true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
keyHeld = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,7 +178,7 @@ bool character_dialog_show_lines(const string[] @dialogLines, bool interrupt = t
|
|||||||
|
|
||||||
string displayLine = currentLine;
|
string displayLine = currentLine;
|
||||||
if (characterDialogShowUsageInstructions && !characterDialogUsageInstructionsShown) {
|
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;
|
characterDialogUsageInstructionsShown = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,8 @@ bool is_windows_reserved_filename(const string& in upperName) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
string sanitize_filename_base_with_reserved_prefix(string name, const int maxLength = 40, const string fallback = "item",
|
string sanitize_filename_base_with_reserved_prefix(string name, const int maxLength = 40,
|
||||||
|
const string fallback = "item",
|
||||||
const string reservedPrefix = "file_") {
|
const string reservedPrefix = "file_") {
|
||||||
string normalized = normalize_name_whitespace(name);
|
string normalized = normalize_name_whitespace(name);
|
||||||
string result = "";
|
string result = "";
|
||||||
|
|||||||
@@ -83,8 +83,8 @@ void check_speech_history_keys() {
|
|||||||
speechHistoryCurrentIndex--;
|
speechHistoryCurrentIndex--;
|
||||||
if (speechHistoryCurrentIndex < 0) {
|
if (speechHistoryCurrentIndex < 0) {
|
||||||
speechHistoryCurrentIndex = 0;
|
speechHistoryCurrentIndex = 0;
|
||||||
screen_reader_speak(speech_history_transform_message("Oldest message. " + speechHistory[speechHistoryCurrentIndex]),
|
screen_reader_speak(
|
||||||
true);
|
speech_history_transform_message("Oldest message. " + speechHistory[speechHistoryCurrentIndex]), true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,8 +105,8 @@ void check_speech_history_keys() {
|
|||||||
speechHistoryCurrentIndex++;
|
speechHistoryCurrentIndex++;
|
||||||
if (speechHistoryCurrentIndex >= int(speechHistory.length())) {
|
if (speechHistoryCurrentIndex >= int(speechHistory.length())) {
|
||||||
speechHistoryCurrentIndex = speechHistory.length() - 1;
|
speechHistoryCurrentIndex = speechHistory.length() - 1;
|
||||||
screen_reader_speak(speech_history_transform_message("Newest message. " + speechHistory[speechHistoryCurrentIndex]),
|
screen_reader_speak(
|
||||||
true);
|
speech_history_transform_message("Newest message. " + speechHistory[speechHistoryCurrentIndex]), true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user