mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 21:52:48 +00:00
Improve string input behaviour
This commit is contained in:
parent
24266a22b8
commit
897aada958
@ -393,10 +393,9 @@ bool ShowInputPrompt(char* inputstr, u32 max_size, const char *format, ...) {
|
|||||||
if (inputstr_size > 1) {
|
if (inputstr_size > 1) {
|
||||||
memmove(&inputstr[cursor_s], &inputstr[cursor_s + 1], (max_size - 1) - cursor_s);
|
memmove(&inputstr[cursor_s], &inputstr[cursor_s + 1], (max_size - 1) - cursor_s);
|
||||||
inputstr_size--;
|
inputstr_size--;
|
||||||
if (cursor_s >= inputstr_size) {
|
if (cursor_s >= inputstr_size)
|
||||||
cursor_s--;
|
cursor_s--;
|
||||||
cursor_a = -1;
|
cursor_a = -1;
|
||||||
}
|
|
||||||
} else inputstr[0] = alphabet[0];
|
} else inputstr[0] = alphabet[0];
|
||||||
} else if (pad_state & BUTTON_Y) {
|
} else if (pad_state & BUTTON_Y) {
|
||||||
if (inputstr_size < max_size - 1) {
|
if (inputstr_size < max_size - 1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user