Skip to content

Commit

Permalink
Fixed menu strings after reloading the language
Browse files Browse the repository at this point in the history
  • Loading branch information
Stitchuuuu committed Jun 12, 2017
1 parent 94dd40f commit 063b84e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions source/graphic.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ void gameSelectorMenu(int n) {
sf2d_swapbuffers();
}

void menu(wchar_t* menu[]) {
void menu(int menu[]) {
sf2d_start_frame(GFX_TOP, GFX_LEFT);
drawMenuTop();
pksm_end_frame();
Expand All @@ -597,7 +597,7 @@ void menu(wchar_t* menu[]) {
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 2; j++) {
sf2d_draw_texture(mainMenuButton, 15 + j*150, 20 + i*63);
sftd_draw_wtext(fontBold15, 15 + j*150 + 52 + (84 - sftd_get_wtext_width(fontBold15, 15, menu[i*2+j])) / 2, 17 + i*63 + (mainMenuButton->height - 15) / 2, LIGHTBLUE, 15, menu[i*2+j]);
sftd_draw_wtext(fontBold15, 15 + j*150 + 52 + (84 - sftd_get_wtext_width(fontBold15, 15, i18n(menu[i*2+j]))) / 2, 17 + i*63 + (mainMenuButton->height - 15) / 2, LIGHTBLUE, 15, i18n(menu[i*2+j]));
switch (i*2+j) {
case 0:
sf2d_draw_texture(iconBank, 25, 18 + (53 - iconBank->height)/2);
Expand Down
2 changes: 1 addition & 1 deletion source/graphic.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void printCredits();
void printTitle(const wchar_t* title);
void gameSelectorMenu(int n);
void mainMenuDS(int currentEntry);
void menu(wchar_t* menu[]);
void menu(int menu[]);
void printDatabase6(char *database[], int currentEntry, int page, int spriteArray[]);
void printDatabase5(char *database[], int currentEntry, int page, int spriteArray[], bool isSelected, int langSelected, bool langVett[]);
void printDatabase4(char *database[], int currentEntry, int page, int spriteArray[], bool isSelected, int langSelected, bool langVett[]);
Expand Down
2 changes: 1 addition & 1 deletion source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ int main() {

GUIElementsSpecify(game);
if (game < 6) {
wchar_t* mainMenu[] = {i18n(S_MAIN_MENU_EXTRA_STORAGE), i18n(S_MAIN_MENU_EDITOR), i18n(S_MAIN_MENU_EVENTS), i18n(S_MAIN_MENU_SAVE_INFO), i18n(S_MAIN_MENU_SETTINGS), i18n(S_MAIN_MENU_CREDITS)};
AppTextCode mainMenu[] = {S_MAIN_MENU_EXTRA_STORAGE, S_MAIN_MENU_EDITOR, S_MAIN_MENU_EVENTS, S_MAIN_MENU_SAVE_INFO, S_MAIN_MENU_SETTINGS, S_MAIN_MENU_CREDITS};
while (aptMainLoop()) {
hidScanInput();
touchPosition touch;
Expand Down

0 comments on commit 063b84e

Please sign in to comment.