[FL-2461] IR: change word from key to button (#1119)
* 2461 ir renamed menu items * Renamed the key to the button Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
parent
ac44b9bc69
commit
29e5e57a70
@ -23,9 +23,9 @@ void InfraredAppSceneEdit::on_enter(InfraredApp* app) {
|
|||||||
InfraredAppViewManager* view_manager = app->get_view_manager();
|
InfraredAppViewManager* view_manager = app->get_view_manager();
|
||||||
Submenu* submenu = view_manager->get_submenu();
|
Submenu* submenu = view_manager->get_submenu();
|
||||||
|
|
||||||
submenu_add_item(submenu, "Add Key", SubmenuIndexAddKey, submenu_callback, app);
|
submenu_add_item(submenu, "Add Button", SubmenuIndexAddKey, submenu_callback, app);
|
||||||
submenu_add_item(submenu, "Rename Key", SubmenuIndexRenameKey, submenu_callback, app);
|
submenu_add_item(submenu, "Rename Button", SubmenuIndexRenameKey, submenu_callback, app);
|
||||||
submenu_add_item(submenu, "Delete Key", SubmenuIndexDeleteKey, submenu_callback, app);
|
submenu_add_item(submenu, "Delete Button", SubmenuIndexDeleteKey, submenu_callback, app);
|
||||||
submenu_add_item(submenu, "Rename Remote", SubmenuIndexRenameRemote, submenu_callback, app);
|
submenu_add_item(submenu, "Rename Remote", SubmenuIndexRenameRemote, submenu_callback, app);
|
||||||
submenu_add_item(submenu, "Delete Remote", SubmenuIndexDeleteRemote, submenu_callback, app);
|
submenu_add_item(submenu, "Delete Remote", SubmenuIndexDeleteRemote, submenu_callback, app);
|
||||||
submenu_set_selected_item(submenu, submenu_item_selected);
|
submenu_set_selected_item(submenu, submenu_item_selected);
|
||||||
|
@ -16,8 +16,9 @@ void InfraredAppSceneEditKeySelect::on_enter(InfraredApp* app) {
|
|||||||
Submenu* submenu = view_manager->get_submenu();
|
Submenu* submenu = view_manager->get_submenu();
|
||||||
int item_number = 0;
|
int item_number = 0;
|
||||||
|
|
||||||
const char* header =
|
const char* header = app->get_edit_action() == InfraredApp::EditAction::Rename ?
|
||||||
app->get_edit_action() == InfraredApp::EditAction::Rename ? "Rename key:" : "Delete key:";
|
"Rename Button:" :
|
||||||
|
"Delete Button:";
|
||||||
submenu_set_header(submenu, header);
|
submenu_set_header(submenu, header);
|
||||||
|
|
||||||
auto remote_manager = app->get_remote_manager();
|
auto remote_manager = app->get_remote_manager();
|
||||||
|
@ -14,7 +14,7 @@ void InfraredAppSceneEditRename::on_enter(InfraredApp* app) {
|
|||||||
strncpy(buffer_str, button_name.c_str(), max_len);
|
strncpy(buffer_str, button_name.c_str(), max_len);
|
||||||
buffer_str[max_len + 1] = 0;
|
buffer_str[max_len + 1] = 0;
|
||||||
enter_name_length = max_len;
|
enter_name_length = max_len;
|
||||||
text_input_set_header_text(text_input, "Name the key");
|
text_input_set_header_text(text_input, "Name the button");
|
||||||
} else {
|
} else {
|
||||||
auto remote_name = remote_manager->get_remote_name();
|
auto remote_name = remote_manager->get_remote_name();
|
||||||
strncpy(app->get_text_store(0), remote_name.c_str(), app->get_text_store_size());
|
strncpy(app->get_text_store(0), remote_name.c_str(), app->get_text_store_size());
|
||||||
|
@ -20,7 +20,7 @@ void InfraredAppSceneLearnEnterName::on_enter(InfraredApp* app) {
|
|||||||
app->set_text_store(0, "RAW_%d", raw_signal.timings_cnt);
|
app->set_text_store(0, "RAW_%d", raw_signal.timings_cnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
text_input_set_header_text(text_input, "Name the key");
|
text_input_set_header_text(text_input, "Name the button");
|
||||||
text_input_set_result_callback(
|
text_input_set_result_callback(
|
||||||
text_input,
|
text_input,
|
||||||
InfraredApp::text_input_callback,
|
InfraredApp::text_input_callback,
|
||||||
|
Loading…
Reference in New Issue
Block a user