From d979ac3bf3924051de8bb4154e8398083535eabb Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Mon, 11 Feb 2019 00:05:20 -0500 Subject: Document main_menu state machine, name window constants The new names for the constants (and newly named functions) give a much better understanding of what the window system is trying to do. --- src/option_menu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/option_menu.c') diff --git a/src/option_menu.c b/src/option_menu.c index 122ba8d8a..6ffc4de50 100644 --- a/src/option_menu.c +++ b/src/option_menu.c @@ -620,7 +620,7 @@ static void ButtonMode_DrawChoices(u8 selection) static void DrawTextOption(void) { - FillWindowPixelBuffer(WIN_TEXT_OPTION, 0x11); + FillWindowPixelBuffer(WIN_TEXT_OPTION, PIXEL_BUFFER_WHITE); AddTextPrinterParameterized(WIN_TEXT_OPTION, 1, gText_Option, 8, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(WIN_TEXT_OPTION, 3); } @@ -629,7 +629,7 @@ static void DrawOptionMenuTexts(void) { u8 i; - FillWindowPixelBuffer(WIN_OPTIONS, 0x11); + FillWindowPixelBuffer(WIN_OPTIONS, PIXEL_BUFFER_WHITE); for (i = 0; i < MENUITEM_COUNT; i++) { AddTextPrinterParameterized(WIN_OPTIONS, 1, sOptionMenuItemsNames[i], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL); -- cgit v1.2.3 From c96f8751cddf1a203bd5f310683ea35bf9cb8db2 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Thu, 21 Feb 2019 23:27:12 -0500 Subject: Improve window palette macros --- src/option_menu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/option_menu.c') diff --git a/src/option_menu.c b/src/option_menu.c index 6ffc4de50..94bbef306 100644 --- a/src/option_menu.c +++ b/src/option_menu.c @@ -620,7 +620,7 @@ static void ButtonMode_DrawChoices(u8 selection) static void DrawTextOption(void) { - FillWindowPixelBuffer(WIN_TEXT_OPTION, PIXEL_BUFFER_WHITE); + FillWindowPixelBuffer(WIN_TEXT_OPTION, PALETTE_NUM_TO_FILL_VALUE(1)); AddTextPrinterParameterized(WIN_TEXT_OPTION, 1, gText_Option, 8, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(WIN_TEXT_OPTION, 3); } @@ -629,7 +629,7 @@ static void DrawOptionMenuTexts(void) { u8 i; - FillWindowPixelBuffer(WIN_OPTIONS, PIXEL_BUFFER_WHITE); + FillWindowPixelBuffer(WIN_OPTIONS, PALETTE_NUM_TO_FILL_VALUE(1)); for (i = 0; i < MENUITEM_COUNT; i++) { AddTextPrinterParameterized(WIN_OPTIONS, 1, sOptionMenuItemsNames[i], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL); -- cgit v1.2.3 From 3716da5430a976d05afecdf82f43f14fc2584949 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sat, 2 Mar 2019 17:25:39 -0500 Subject: Rename macro with correct name for pixel values --- src/option_menu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/option_menu.c') diff --git a/src/option_menu.c b/src/option_menu.c index 94bbef306..1766f0bdb 100644 --- a/src/option_menu.c +++ b/src/option_menu.c @@ -620,7 +620,7 @@ static void ButtonMode_DrawChoices(u8 selection) static void DrawTextOption(void) { - FillWindowPixelBuffer(WIN_TEXT_OPTION, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(WIN_TEXT_OPTION, PIXEL_FILL(1)); AddTextPrinterParameterized(WIN_TEXT_OPTION, 1, gText_Option, 8, 1, TEXT_SPEED_FF, NULL); CopyWindowToVram(WIN_TEXT_OPTION, 3); } @@ -629,7 +629,7 @@ static void DrawOptionMenuTexts(void) { u8 i; - FillWindowPixelBuffer(WIN_OPTIONS, PALETTE_NUM_TO_FILL_VALUE(1)); + FillWindowPixelBuffer(WIN_OPTIONS, PIXEL_FILL(1)); for (i = 0; i < MENUITEM_COUNT; i++) { AddTextPrinterParameterized(WIN_OPTIONS, 1, sOptionMenuItemsNames[i], 8, (i * 16) + 1, TEXT_SPEED_FF, NULL); -- cgit v1.2.3