Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add message box when clicking "More" in AmiiDB results list #245

Merged
merged 8 commits into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions fw/application/src/app/amiidb/scene/amiidb_scene_amiibo_search.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,21 @@ static void amiidb_scene_amiibo_search_text_input_event_cb(mui_text_input_event_
}
}

static void amiidb_msg_box_error_cb(mui_msg_box_event_t event, mui_msg_box_t *p_msg_box) {
app_amiidb_t *app = p_msg_box->user_data;
mui_scene_dispatcher_next_scene(app->p_scene_dispatcher, AMIIDB_SCENE_AMIIBO_SEARCH);
Schokobecher marked this conversation as resolved.
Show resolved Hide resolved
}

static void amiidb_show_message(app_amiidb_t *app, const char *msg) {
mui_msg_box_set_header(app->p_msg_box, getLangString(_L_ERR));
mui_msg_box_set_message(app->p_msg_box, msg);
mui_msg_box_set_btn_text(app->p_msg_box, NULL, getLangString(_L_CONFIRM), NULL);
mui_msg_box_set_btn_focus(app->p_msg_box, 1);
mui_msg_box_set_event_cb(app->p_msg_box, amiidb_msg_box_error_cb);

mui_view_dispatcher_switch_to_view(app->p_view_dispatcher, AMIIDB_VIEW_ID_MSG_BOX);
}

static void amiidb_scene_amiibo_search_list_view_on_selected(mui_list_view_event_t event, mui_list_view_t *p_list_view,
mui_list_item_t *p_item) {
uint16_t icon = p_item->icon;
Expand All @@ -49,6 +64,10 @@ static void amiidb_scene_amiibo_search_list_view_on_selected(mui_list_view_event
mui_text_input_set_event_cb(app->p_text_input, amiidb_scene_amiibo_search_text_input_event_cb);
mui_view_dispatcher_switch_to_view(app->p_view_dispatcher, AMIIDB_VIEW_ID_INPUT);
} break;

case ICON_ERROR: {
amiidb_show_message(app, _T(APP_AMIIDB_MORE_MESSAGE));
} break;
}
}

Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/de_DE.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const char * const lang_de_DE[_L_COUNT] = {
[_L_APP_AMIIDB_DETAIL_BACK_LIST] = "[Zurück zur Liste]",
[_L_APP_AMIIDB_SEARCH_HEAD] = "Suche:",
[_L_APP_AMIIDB_MORE] = "[Mehr...]",
[_L_APP_AMIIDB_MORE_MESSAGE] = "Zu viele Ergebnisse. Bitte Suche eingrenzen.",
[_L_APP_AMIIDB_EMPTY_TAG] = "<Leerer Amiibo>",
[_L_APP_AMIIDB_SLOT_DELETE] = "Zurücksetzen...",
[_L_APP_AMIIDB_CONFIRM] = "Bestätigen",
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/en_US.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const char * const lang_en_US[_L_COUNT] = {
[_L_APP_AMIIDB_DETAIL_BACK_LIST] = "[Back to List]",
[_L_APP_AMIIDB_SEARCH_HEAD] = "Search:",
[_L_APP_AMIIDB_MORE] = "[More...]",
[_L_APP_AMIIDB_MORE_MESSAGE] = "Too many results. Try a more specific search.",
[_L_APP_AMIIDB_EMPTY_TAG] = "<Blank Amiibo>",
[_L_APP_AMIIDB_SLOT_DELETE] = "Reset...",
[_L_APP_AMIIDB_CONFIRM] = "Confirm",
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/es_ES.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const char * const lang_es_ES[_L_COUNT] = {
[_L_APP_AMIIDB_DETAIL_BACK_LIST] = "[Volver a Lista]",
[_L_APP_AMIIDB_SEARCH_HEAD] = "Buscar:",
[_L_APP_AMIIDB_MORE] = "[Más...]",
[_L_APP_AMIIDB_MORE_MESSAGE] = "",
[_L_APP_AMIIDB_EMPTY_TAG] = "<No Asignado>",
[_L_APP_AMIIDB_SLOT_DELETE] = "Borrar...",
[_L_APP_AMIIDB_CONFIRM] = "Confirmar",
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/fr_FR.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const char * const lang_fr_FR[_L_COUNT] = {
[_L_APP_AMIIDB_DETAIL_BACK_LIST] = "[Retour à la Liste]",
[_L_APP_AMIIDB_SEARCH_HEAD] = "Recherche:",
[_L_APP_AMIIDB_MORE] = "[Plus...]",
[_L_APP_AMIIDB_MORE_MESSAGE] = "",
[_L_APP_AMIIDB_EMPTY_TAG] = "<Amiibo Vierge>",
[_L_APP_AMIIDB_SLOT_DELETE] = "Réinitialiser...",
[_L_APP_AMIIDB_CONFIRM] = "Confirmer",
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/hu_HU.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const char * const lang_hu_HU[_L_COUNT] = {
[_L_APP_AMIIDB_DETAIL_BACK_LIST] = "[Vissza a Listához]",
[_L_APP_AMIIDB_SEARCH_HEAD] = "Keresés:",
[_L_APP_AMIIDB_MORE] = "[Bővebben...]",
[_L_APP_AMIIDB_MORE_MESSAGE] = "",
[_L_APP_AMIIDB_EMPTY_TAG] = "<Üres Amiibo>",
[_L_APP_AMIIDB_SLOT_DELETE] = "Újraindítás...",
[_L_APP_AMIIDB_CONFIRM] = "Megerősítés",
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/it_IT.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const char * const lang_it_IT[_L_COUNT] = {
[_L_APP_AMIIDB_DETAIL_BACK_LIST] = "[Torna alla lista]",
[_L_APP_AMIIDB_SEARCH_HEAD] = "Cerca:",
[_L_APP_AMIIDB_MORE] = "[Più...]",
[_L_APP_AMIIDB_MORE_MESSAGE] = "",
[_L_APP_AMIIDB_EMPTY_TAG] = "<Non assegnato>",
[_L_APP_AMIIDB_SLOT_DELETE] = "Elimina...",
[_L_APP_AMIIDB_CONFIRM] = "Conferma",
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/ja_JP.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const char * const lang_ja_JP[_L_COUNT] = {
[_L_APP_AMIIDB_DETAIL_BACK_LIST] = "[リストに戻る]",
[_L_APP_AMIIDB_SEARCH_HEAD] = "検索する:",
[_L_APP_AMIIDB_MORE] = "[もっと見る...]",
[_L_APP_AMIIDB_MORE_MESSAGE] = "",
[_L_APP_AMIIDB_EMPTY_TAG] = "<Amiiboが見つかりません>",
[_L_APP_AMIIDB_SLOT_DELETE] = "リセット...",
[_L_APP_AMIIDB_CONFIRM] = "確認する",
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/nl_NL.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const char * const lang_nl_NL[_L_COUNT] = {
[_L_APP_AMIIDB_DETAIL_BACK_LIST] = "[Terug naar Lijst].",
[_L_APP_AMIIDB_SEARCH_HEAD] = "Zoeken:",
[_L_APP_AMIIDB_MORE] = "[Meer...]",
[_L_APP_AMIIDB_MORE_MESSAGE] = "",
[_L_APP_AMIIDB_EMPTY_TAG] = "<Blanke Amiibo>",
[_L_APP_AMIIDB_SLOT_DELETE] = "Reset...",
[_L_APP_AMIIDB_CONFIRM] = "Bevestigen",
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/pt_BR.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const char * const lang_pt_BR[_L_COUNT] = {
[_L_APP_AMIIDB_DETAIL_BACK_LIST] = "[Voltar Para a Lista]",
[_L_APP_AMIIDB_SEARCH_HEAD] = "Pesquisar:",
[_L_APP_AMIIDB_MORE] = "[Mais...]",
[_L_APP_AMIIDB_MORE_MESSAGE] = "",
[_L_APP_AMIIDB_EMPTY_TAG] = "<Amiibo em Branco>",
[_L_APP_AMIIDB_SLOT_DELETE] = "Reiniciar...",
[_L_APP_AMIIDB_CONFIRM] = "Confirmar",
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/ru_RU.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const char * const lang_ru_RU[_L_COUNT] = {
[_L_APP_AMIIDB_DETAIL_BACK_LIST] = "[Назад к списку]",
[_L_APP_AMIIDB_SEARCH_HEAD] = "Поиск:",
[_L_APP_AMIIDB_MORE] = "[Дальше...]",
[_L_APP_AMIIDB_MORE_MESSAGE] = "",
[_L_APP_AMIIDB_EMPTY_TAG] = "<пустой тег>",
[_L_APP_AMIIDB_SLOT_DELETE] = "Сброс...",
[_L_APP_AMIIDB_CONFIRM] = "Да",
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/string_id.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ typedef enum {
_L_APP_AMIIDB_DETAIL_BACK_LIST,
_L_APP_AMIIDB_SEARCH_HEAD,
_L_APP_AMIIDB_MORE,
_L_APP_AMIIDB_MORE_MESSAGE,
_L_APP_AMIIDB_EMPTY_TAG,
_L_APP_AMIIDB_SLOT_DELETE,
_L_APP_AMIIDB_CONFIRM,
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/zh_Hans.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const char * const lang_zh_Hans[_L_COUNT] = {
[_L_APP_AMIIDB_DETAIL_BACK_LIST] = "[返回列表]",
[_L_APP_AMIIDB_SEARCH_HEAD] = "搜索:",
[_L_APP_AMIIDB_MORE] = "[更多]",
[_L_APP_AMIIDB_MORE_MESSAGE] = "",
[_L_APP_AMIIDB_EMPTY_TAG] = "<空标签>",
[_L_APP_AMIIDB_SLOT_DELETE] = "重置...",
[_L_APP_AMIIDB_CONFIRM] = "确认",
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/i18n/zh_TW.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const char * const lang_zh_TW[_L_COUNT] = {
[_L_APP_AMIIDB_DETAIL_BACK_LIST] = "[返回列表]",
[_L_APP_AMIIDB_SEARCH_HEAD] = "搜索:",
[_L_APP_AMIIDB_MORE] = "[更多]",
[_L_APP_AMIIDB_MORE_MESSAGE] = "",
[_L_APP_AMIIDB_EMPTY_TAG] = "<空標簽>",
[_L_APP_AMIIDB_SLOT_DELETE] = "重置...",
[_L_APP_AMIIDB_CONFIRM] = "確認",
Expand Down
1 change: 1 addition & 0 deletions fw/data/i18n.csv
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ _L_APP_AMIIDB_DETAIL_BACK_DETAIL,[Back to Detail],[返回详情],[返回詳情],
_L_APP_AMIIDB_DETAIL_BACK_LIST,[Back to List],[返回列表],[返回列表],[Volver a Lista],[Vissza a Listához],[Zurück zur Liste],[Retour à la Liste],[Terug naar Lijst].,[Voltar Para a Lista],[リストに戻る],[Torna alla lista],[Назад к списку]
_L_APP_AMIIDB_SEARCH_HEAD,Search:,搜索:,搜索:,Buscar:,Keresés:,Suche:,Recherche:,Zoeken:,Pesquisar:,検索する:,Cerca:,Поиск:
_L_APP_AMIIDB_MORE,[More...],[更多],[更多],[Más...],[Bővebben...],[Mehr...],[Plus...],[Meer...],[Mais...],[もっと見る...],[Più...],[Дальше...]
_L_APP_AMIIDB_MORE_MESSAGE,Too many results. Try a more specific search.,,,,,Zu viele Ergebnisse. Bitte Suche eingrenzen.,,,,,,,
Schokobecher marked this conversation as resolved.
Show resolved Hide resolved
_L_APP_AMIIDB_EMPTY_TAG,<Blank Amiibo>,<空标签>,<空標簽>,<No Asignado>,<Üres Amiibo>,<Leerer Amiibo>,<Amiibo Vierge>,<Blanke Amiibo>,<Amiibo em Branco>,<Amiiboが見つかりません>,<Non assegnato>,<пустой тег>
_L_APP_AMIIDB_SLOT_DELETE,Reset...,重置...,重置...,Borrar...,Újraindítás...,Zurücksetzen...,Réinitialiser...,Reset...,Reiniciar...,リセット...,Elimina...,Сброс...
_L_APP_AMIIDB_CONFIRM,Confirm,确认,確認,Confirmar,Megerősítés,Bestätigen,Confirmer,Bevestigen,Confirmar,確認する,Conferma,Да
Expand Down
Loading