mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-20 03:41:42 +03:00
Merge branch 'dev' into eng_dev
This commit is contained in:
commit
e6f9563bbc
@ -325,6 +325,7 @@ static void text_input_handle_down(TextInput* text_input, TextInputModel* model)
|
||||
static void text_input_handle_left(TextInput* text_input, TextInputModel* model) {
|
||||
UNUSED(text_input);
|
||||
if(model->cursor_select) {
|
||||
model->clear_default_text = false;
|
||||
if(model->cursor_pos > 0) {
|
||||
model->cursor_pos = CLAMP(model->cursor_pos - 1, strlen(model->text_buffer), 0u);
|
||||
}
|
||||
@ -338,6 +339,7 @@ static void text_input_handle_left(TextInput* text_input, TextInputModel* model)
|
||||
static void text_input_handle_right(TextInput* text_input, TextInputModel* model) {
|
||||
UNUSED(text_input);
|
||||
if(model->cursor_select) {
|
||||
model->clear_default_text = false;
|
||||
model->cursor_pos = CLAMP(model->cursor_pos + 1, strlen(model->text_buffer), 0u);
|
||||
} else if(model->selected_column < get_row_size(model->selected_row) - 1) {
|
||||
model->selected_column++;
|
||||
@ -347,7 +349,10 @@ static void text_input_handle_right(TextInput* text_input, TextInputModel* model
|
||||
}
|
||||
|
||||
static void text_input_handle_ok(TextInput* text_input, TextInputModel* model, InputType type) {
|
||||
if(model->cursor_select) return;
|
||||
if(model->cursor_select) {
|
||||
model->clear_default_text = !model->clear_default_text;
|
||||
return;
|
||||
}
|
||||
bool shift = type == InputTypeLong;
|
||||
bool repeat = type == InputTypeRepeat;
|
||||
char selected = get_selected_char(model);
|
||||
|
Loading…
Reference in New Issue
Block a user