From e0e81c5fbe6a0c0bdcbb5a1de5e16dfb1ffdc091 Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Tue, 9 Jul 2019 14:07:19 +0800 Subject: finished menu (1 failed attempt) --- src/new_menu_helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/new_menu_helpers.c') diff --git a/src/new_menu_helpers.c b/src/new_menu_helpers.c index 1939154da..8ef515006 100644 --- a/src/new_menu_helpers.c +++ b/src/new_menu_helpers.c @@ -603,7 +603,7 @@ void sub_80F771C(bool8 copyToVram) void SetStdWindowBorderStyle(u8 windowId, bool8 copyToVram) { - SetWindowBorderStyle(windowId, copyToVram, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM); + DrawStdFrameWithCustomTileAndPalette(windowId, copyToVram, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM); } void sub_80F7768(u8 windowId, bool8 copyToVram) -- cgit v1.2.3 From bcf27c2de147b1a04c32f8f9e5dd8a5eca657455 Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Wed, 10 Jul 2019 03:19:28 +0800 Subject: resolved SetWindowTemplateFields --- src/new_menu_helpers.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/new_menu_helpers.c') diff --git a/src/new_menu_helpers.c b/src/new_menu_helpers.c index 8ef515006..5e2452e14 100644 --- a/src/new_menu_helpers.c +++ b/src/new_menu_helpers.c @@ -671,10 +671,9 @@ u8 sub_80F78E0(u8 height) { if (sStartMenuWindowId == 0xFF) { - struct WindowTemplate wTemp1, wTemp2; - SetWindowTemplateFields(&wTemp1, 0, 0x16, 1, 7, height * 2 - 1, DLG_WINDOW_PALETTE_NUM, 0x13D); - wTemp2 = wTemp1; - sStartMenuWindowId = AddWindow(&wTemp2); + struct WindowTemplate template; + template = SetWindowTemplateFields(0, 0x16, 1, 7, height * 2 - 1, DLG_WINDOW_PALETTE_NUM, 0x13D); + sStartMenuWindowId = AddWindow(&template); PutWindowTilemap(sStartMenuWindowId); } return sStartMenuWindowId; -- cgit v1.2.3 From 9d539994652736c50a054c8d3c6beb8f221f3428 Mon Sep 17 00:00:00 2001 From: jiangzhengwenjz Date: Wed, 10 Jul 2019 03:21:34 +0800 Subject: polish and bug fix --- src/new_menu_helpers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/new_menu_helpers.c') diff --git a/src/new_menu_helpers.c b/src/new_menu_helpers.c index 5e2452e14..9d2a5c883 100644 --- a/src/new_menu_helpers.c +++ b/src/new_menu_helpers.c @@ -671,8 +671,7 @@ u8 sub_80F78E0(u8 height) { if (sStartMenuWindowId == 0xFF) { - struct WindowTemplate template; - template = SetWindowTemplateFields(0, 0x16, 1, 7, height * 2 - 1, DLG_WINDOW_PALETTE_NUM, 0x13D); + struct WindowTemplate template = SetWindowTemplateFields(0, 0x16, 1, 7, height * 2 - 1, DLG_WINDOW_PALETTE_NUM, 0x13D); sStartMenuWindowId = AddWindow(&template); PutWindowTilemap(sStartMenuWindowId); } -- cgit v1.2.3