Skip to content

Commit

Permalink
remove chinese chars to reduce font size
Browse files Browse the repository at this point in the history
  • Loading branch information
solosky committed Nov 20, 2024
1 parent 4065d91 commit ee8ef4c
Show file tree
Hide file tree
Showing 7 changed files with 1,082 additions and 1,281 deletions.
23 changes: 11 additions & 12 deletions fw/application/src/app/game/app_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ void app_game_on_run(mini_app_inst_t *p_app_inst) {
mui_list_view_set_user_data(p_app_handle->p_list_view, p_app_handle);
game_view_set_user_data(p_app_handle->p_game_view, p_app_handle);


mui_view_dispatcher_add_view(p_app_handle->p_view_dispatcher, GAME_VIEW_ID_GAME,
game_view_get_view(p_app_handle->p_game_view));

mui_view_dispatcher_add_view(p_app_handle->p_view_dispatcher, GAME_VIEW_ID_LIST,
mui_view_dispatcher_add_view(p_app_handle->p_view_dispatcher, GAME_VIEW_ID_LIST,
mui_list_view_get_view(p_app_handle->p_list_view));

mui_view_dispatcher_attach(p_app_handle->p_view_dispatcher, MUI_LAYER_FULLSCREEN);
Expand Down Expand Up @@ -57,13 +56,13 @@ void app_game_on_kill(mini_app_inst_t *p_app_inst) {
void app_game_on_event(mini_app_inst_t *p_app_inst, mini_app_event_t *p_event) {}

mini_app_t app_game_info = {.id = MINI_APP_ID_GAME,
.name = "动画播放器",
.name_i18n_key = _L_APP_GAME,
.icon = 0xe021,
.deamon = false,
.sys = false,
.hibernate_enabled = false,
.icon_32x32 = &app_card_emulator_32x32,
.run_cb = app_game_on_run,
.kill_cb = app_game_on_kill,
.on_event_cb = app_game_on_event};
.name = "动画播放器",
.name_i18n_key = _L_APP_GAME,
.icon = 0xe021,
.deamon = false,
.sys = false,
.hibernate_enabled = false,
.icon_32x32 = &app_game_32x32,
.run_cb = app_game_on_run,
.kill_cb = app_game_on_kill,
.on_event_cb = app_game_on_event};
15 changes: 6 additions & 9 deletions fw/application/src/app/game/scene/game_scene_game_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@
#include "nrf_log.h"
#include "nrf_log_ctrl.h"


#include "tiny_invaders.h"
#include "tiny_arkanoid.h"
#include "tiny_tris.h"
#include "tiny_invaders.h"
#include "tiny_lander.h"


#include "tiny_tris.h"

#define ICON_FOLDER 0xe1d6
#define ICON_FILE 0xe1ed
Expand All @@ -25,15 +22,15 @@
#define ICON_HOME 0xe1f0

static void game_scene_game_list_on_selected(mui_list_view_event_t event, mui_list_view_t *p_list_view,
mui_list_item_t *p_item) {
mui_list_item_t *p_item) {
app_game_t *app = p_list_view->user_data;
uint32_t idx = (uint32_t)p_item->user_data;

if (event == MUI_LIST_VIEW_EVENT_SELECTED) {
if(p_item->icon == ICON_FILE){
if (p_item->icon == ICON_FILE) {
game_view_set_game_run(app->p_game_view, p_item->user_data);
mui_scene_dispatcher_next_scene(app->p_scene_dispatcher, GAME_SCENE_PLAY);
}else{
} else {
mini_app_launcher_kill(mini_app_launcher(), MINI_APP_ID_GAME);
}
} else {
Expand All @@ -54,7 +51,7 @@ static void game_scene_game_list_reload_folders(app_game_t *app) {
mui_list_view_add_item(app->p_list_view, ICON_FILE, "Tiny Lander", tiny_lander_run);
mui_list_view_add_item(app->p_list_view, ICON_FILE, "Tiny Invaders", tiny_invaders_run);
mui_list_view_add_item(app->p_list_view, ICON_FILE, "Tiny Arkanoid", tiny_arkanoid_run);
//mui_list_view_add_item(app->p_list_view, ICON_FILE, "Tiny Tris", tiny_tris_run);
mui_list_view_add_item(app->p_list_view, ICON_FILE, "Tiny Tris", tiny_tris_run);
}

void game_scene_game_list_on_enter(void *user_data) {
Expand Down
17 changes: 17 additions & 0 deletions fw/application/src/mui/mui_resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,23 @@ const uint8_t app_card_emulator_32x32_data[] = {
const xbm_t app_card_emulator_32x32 = {.width = 32, .height = 32, .data = app_card_emulator_32x32_data};


//************************************************************************
//** /resources/bmp/app_game_32x32.bmp
//************************************************************************
const uint8_t app_game_32x32_data[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0xff,0x03,0x30,0x00,0x00,0x0c,0x18,0x00,
0x00,0x18,0x88,0xff,0xff,0x11,0x48,0x00,0x00,0x12,0x28,0xc0,0xb7,0x14,0x28,
0x00,0x00,0x14,0xa8,0xff,0xff,0x15,0x48,0x00,0x00,0x12,0x28,0xc7,0x7f,0x14,
0x28,0x09,0x00,0x14,0xa8,0xc8,0x6a,0x14,0x38,0x06,0x00,0x1c,0x78,0x00,0x00,
0x1e,0xf8,0x3f,0xfc,0x1f,0xf8,0x7f,0xfe,0x1f,0xf8,0xff,0xff,0x1f,0xf8,0xff,
0xff,0x1f,0xf8,0xff,0xff,0x1f,0xf8,0xff,0xff,0x1f,0xf0,0xff,0xff,0x0f,0x80,
0xff,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
const xbm_t app_game_32x32 = {.width = 32, .height = 32, .data = app_game_32x32_data};


//************************************************************************
//** /resources/bmp/app_settings_32x32.bmp
//************************************************************************
Expand Down
1 change: 1 addition & 0 deletions fw/application/src/mui/mui_resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ extern const xbm_t app_amiibo_emulator_32x32;
extern const xbm_t app_amiibo_link_32x32;
extern const xbm_t app_ble_transfer_32x32;
extern const xbm_t app_card_emulator_32x32;
extern const xbm_t app_game_32x32;
extern const xbm_t app_settings_32x32;

#endif
Loading

0 comments on commit ee8ef4c

Please sign in to comment.