Improve window palette macros
This commit is contained in:
@@ -486,7 +486,7 @@ void RedrawListMenu(u8 listTaskId)
|
||||
{
|
||||
struct ListMenu *list = (void*) gTasks[listTaskId].data;
|
||||
|
||||
FillWindowPixelBuffer(list->template.windowId, (list->template.fillValue << 4) | (list->template.fillValue));
|
||||
FillWindowPixelBuffer(list->template.windowId, PALETTE_NUM_TO_FILL_VALUE(list->template.fillValue));
|
||||
ListMenuPrintEntries(list, list->scrollOffset, 0, list->template.maxShowed);
|
||||
ListMenuDrawCursor(list);
|
||||
CopyWindowToVram(list->template.windowId, 2);
|
||||
@@ -584,7 +584,7 @@ static u8 ListMenuInitInternal(struct ListMenuTemplate *listMenuTemplate, u16 sc
|
||||
if (list->template.totalItems < list->template.maxShowed)
|
||||
list->template.maxShowed = list->template.totalItems;
|
||||
|
||||
FillWindowPixelBuffer(list->template.windowId, (list->template.fillValue << 4) | (list->template.fillValue));
|
||||
FillWindowPixelBuffer(list->template.windowId, PALETTE_NUM_TO_FILL_VALUE(list->template.fillValue));
|
||||
ListMenuPrintEntries(list, list->scrollOffset, 0, list->template.maxShowed);
|
||||
ListMenuDrawCursor(list);
|
||||
ListMenuCallSelectionChangedCallback(list, TRUE);
|
||||
@@ -795,7 +795,7 @@ static void ListMenuScroll(struct ListMenu *list, u8 count, bool8 movingDown)
|
||||
{
|
||||
if (count >= list->template.maxShowed)
|
||||
{
|
||||
FillWindowPixelBuffer(list->template.windowId, (list->template.fillValue << 4) | (list->template.fillValue));
|
||||
FillWindowPixelBuffer(list->template.windowId, PALETTE_NUM_TO_FILL_VALUE(list->template.fillValue));
|
||||
ListMenuPrintEntries(list, list->scrollOffset, 0, list->template.maxShowed);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user