2017-10-12 23:05:36 -04:00
|
|
|
#ifndef GUARD_MENU_HELPERS_H
|
|
|
|
#define GUARD_MENU_HELPERS_H
|
|
|
|
|
2018-02-07 00:07:42 -06:00
|
|
|
#include "task.h"
|
2018-08-14 21:56:11 -07:00
|
|
|
#include "window.h"
|
2018-02-07 00:07:42 -06:00
|
|
|
|
2019-10-17 19:22:03 -04:00
|
|
|
#define MENU_L_PRESSED 1
|
|
|
|
#define MENU_R_PRESSED 2
|
|
|
|
|
2017-10-12 23:05:36 -04:00
|
|
|
// Exported type declarations
|
|
|
|
|
2017-12-16 00:08:23 +01:00
|
|
|
struct YesNoFuncTable
|
|
|
|
{
|
2017-10-22 18:55:07 -04:00
|
|
|
TaskFunc yesFunc;
|
|
|
|
TaskFunc noFunc;
|
|
|
|
};
|
|
|
|
|
2017-10-12 23:05:36 -04:00
|
|
|
// Exported RAM declarations
|
|
|
|
|
|
|
|
// Exported ROM declarations
|
2017-12-09 21:23:40 +01:00
|
|
|
void ResetVramOamAndBgCntRegs(void);
|
|
|
|
void ResetAllBgsCoordinates(void);
|
2018-05-15 20:22:19 +02:00
|
|
|
void SetVBlankHBlankCallbacksToNull(void);
|
|
|
|
void DisplayMessageAndContinueTask(u8 taskId, u8 windowId, u16 arg2, u8 arg3, u8 fontId, u8 textSpeed, const u8 *string, void *taskFunc);
|
2017-12-09 21:23:40 +01:00
|
|
|
bool16 RunTextPrintersRetIsActive(u8 textPrinterId);
|
2018-12-31 16:09:45 -06:00
|
|
|
void DoYesNoFuncWithChoice(u8 taskId, const struct YesNoFuncTable *data);
|
2017-12-16 15:10:29 +01:00
|
|
|
void CreateYesNoMenuWithCallbacks(u8 taskId, const struct WindowTemplate *template, u8 arg2, u8 arg3, u8 arg4, u16 tileStart, u8 palette, const struct YesNoFuncTable *yesNo);
|
2018-05-15 20:22:19 +02:00
|
|
|
bool8 AdjustQuantityAccordingToDPadInput(s16 *arg0, u16 arg1);
|
2019-10-17 19:22:03 -04:00
|
|
|
u8 GetLRKeysPressed(void);
|
|
|
|
u8 GetLRKeysPressedAndHeld(void);
|
2021-08-03 02:17:01 -04:00
|
|
|
bool8 IsHoldingItemAllowed(u16 itemId);
|
2021-04-22 18:49:54 -04:00
|
|
|
bool8 IsWritingMailAllowed(u16 itemId);
|
2020-05-14 01:37:09 -07:00
|
|
|
bool8 MenuHelpers_LinkSomething(void);
|
|
|
|
bool8 MenuHelpers_CallLinkSomething(void);
|
2021-04-25 12:07:08 -04:00
|
|
|
void SetItemListPerPageCount(struct ItemSlot *slots, u8 slotsCount, u8 *pageItems, u8 *totalItems, u8 maxPerPage);
|
|
|
|
void SetCursorWithinListBounds(u16 *scrollOffset, u16 *cursorPos, u8 maxShownItems, u8 totalItems);
|
2021-08-03 02:17:01 -04:00
|
|
|
void SetCursorScrollWithinListBounds(u16 *scrollOffset, u16 *cursorPos, u8 shownItems, u8 totalItems, u8 maxShownItems);
|
2021-04-11 16:23:10 -04:00
|
|
|
void LoadListMenuSwapLineGfx(void);
|
|
|
|
void CreateSwapLineSprites(u8 *spriteIds, u8 count);
|
|
|
|
void DestroySwapLineSprites(u8 *spriteIds, u8 count);
|
|
|
|
void SetSwapLineSpritesInvisibility(u8 *spriteIds, u8 count, bool8 invisible);
|
|
|
|
void UpdateSwapLineSpritesPos(u8 *spriteIds, u8 count, s16 x, u16 y);
|
2017-10-12 23:05:36 -04:00
|
|
|
|
|
|
|
#endif //GUARD_MENU_HELPERS_H
|