[FL-1404] iButton long names fix (#528)
* ibutton: long names partial fix\ * ibutton: limit max filename length to 22 chars * elwrapping long names to a new line * Proper m-string size usage Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
		| @@ -41,7 +41,7 @@ void iButtonSceneDeleteConfirm::on_enter(iButtonApp* app) { | ||||
|         break; | ||||
|     } | ||||
|  | ||||
|     dialog_ex_set_text(dialog_ex, app->get_text_store(), 64, 26, AlignCenter, AlignCenter); | ||||
|     dialog_ex_set_text(dialog_ex, app->get_text_store(), 64, 20, AlignCenter, AlignCenter); | ||||
|     dialog_ex_set_left_button_text(dialog_ex, "Back"); | ||||
|     dialog_ex_set_right_button_text(dialog_ex, "Delete"); | ||||
|     dialog_ex_set_result_callback(dialog_ex, callback); | ||||
|   | ||||
| @@ -51,17 +51,17 @@ void iButtonSceneEmulate::on_enter(iButtonApp* app) { | ||||
|  | ||||
|     switch(line_count) { | ||||
|     case 3: | ||||
|         popup_set_header(popup, "iButton", 92, 18, AlignCenter, AlignBottom); | ||||
|         popup_set_text(popup, app->get_text_store(), 92, 22, AlignCenter, AlignTop); | ||||
|         popup_set_header(popup, "iButton", 82, 18, AlignCenter, AlignBottom); | ||||
|         popup_set_text(popup, app->get_text_store(), 82, 22, AlignCenter, AlignTop); | ||||
|         break; | ||||
|  | ||||
|     default: | ||||
|         popup_set_header(popup, "iButton", 92, 24, AlignCenter, AlignBottom); | ||||
|         popup_set_text(popup, app->get_text_store(), 92, 28, AlignCenter, AlignTop); | ||||
|         popup_set_header(popup, "iButton", 82, 24, AlignCenter, AlignBottom); | ||||
|         popup_set_text(popup, app->get_text_store(), 82, 28, AlignCenter, AlignTop); | ||||
|         break; | ||||
|     } | ||||
|  | ||||
|     popup_set_icon(popup, 10, 10, I_iButtonKey_49x44); | ||||
|     popup_set_icon(popup, 2, 10, I_iButtonKey_49x44); | ||||
|  | ||||
|     view_manager->switch_to(iButtonAppViewManager::Type::iButtonAppViewPopup); | ||||
|     app->get_key_worker()->start_emulate(app->get_key()); | ||||
|   | ||||
| @@ -22,7 +22,7 @@ void iButtonSceneSaveName::on_enter(iButtonApp* app) { | ||||
|  | ||||
|     text_input_set_header_text(text_input, "Name the key"); | ||||
|     text_input_set_result_callback( | ||||
|         text_input, callback, app, app->get_text_store(), app->get_text_store_size()); | ||||
|         text_input, callback, app, app->get_text_store(), IBUTTON_KEY_NAME_SIZE); | ||||
|  | ||||
|     view_manager->switch_to(iButtonAppViewManager::Type::iButtonAppViewTextInput); | ||||
| } | ||||
|   | ||||
| @@ -11,7 +11,7 @@ void iButtonSceneWriteSuccess::on_enter(iButtonApp* app) { | ||||
|     auto callback = cbc::obtain_connector(this, &iButtonSceneWriteSuccess::popup_callback); | ||||
|  | ||||
|     popup_set_icon(popup, 0, 12, I_iButtonDolphinVerySuccess_108x52); | ||||
|     popup_set_text(popup, "Successful writing!", 47, 14, AlignLeft, AlignBottom); | ||||
|     popup_set_text(popup, "Successfully written!", 44, 14, AlignLeft, AlignBottom); | ||||
|  | ||||
|     popup_set_callback(popup, callback); | ||||
|     popup_set_context(popup, app); | ||||
|   | ||||
| @@ -46,17 +46,17 @@ void iButtonSceneWrite::on_enter(iButtonApp* app) { | ||||
|  | ||||
|     switch(line_count) { | ||||
|     case 3: | ||||
|         popup_set_header(popup, "iButton", 92, 18, AlignCenter, AlignBottom); | ||||
|         popup_set_text(popup, app->get_text_store(), 92, 22, AlignCenter, AlignTop); | ||||
|         popup_set_header(popup, "iButton", 82, 18, AlignCenter, AlignBottom); | ||||
|         popup_set_text(popup, app->get_text_store(), 82, 22, AlignCenter, AlignTop); | ||||
|         break; | ||||
|  | ||||
|     default: | ||||
|         popup_set_header(popup, "iButton", 92, 24, AlignCenter, AlignBottom); | ||||
|         popup_set_text(popup, app->get_text_store(), 92, 28, AlignCenter, AlignTop); | ||||
|         popup_set_header(popup, "iButton", 82, 24, AlignCenter, AlignBottom); | ||||
|         popup_set_text(popup, app->get_text_store(), 82, 28, AlignCenter, AlignTop); | ||||
|         break; | ||||
|     } | ||||
|  | ||||
|     popup_set_icon(popup, 10, 10, I_iButtonKey_49x44); | ||||
|     popup_set_icon(popup, 2, 10, I_iButtonKey_49x44); | ||||
|  | ||||
|     view_manager->switch_to(iButtonAppViewManager::Type::iButtonAppViewPopup); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user