2017-10-13 16:09:36 +01:00
|
|
|
#ifndef GUARD_SCRIPT_MENU_H
|
|
|
|
#define GUARD_SCRIPT_MENU_H
|
2017-10-12 08:06:19 +01:00
|
|
|
|
2023-01-15 12:41:10 +00:00
|
|
|
#include "list_menu.h"
|
2023-08-10 05:38:23 +01:00
|
|
|
#include "constants/script_menu.h"
|
2023-11-23 20:31:33 +00:00
|
|
|
#include "menu.h"
|
2023-08-10 05:38:23 +01:00
|
|
|
|
2023-01-15 12:41:10 +00:00
|
|
|
// The default size the stack for dynamic multichoice is initialized to
|
|
|
|
// If you try to push an element when the stack is full, it will be reallocated
|
|
|
|
// With increasing capacity of MULTICHOICE_DYNAMIC_STACK_INC
|
|
|
|
|
|
|
|
#define MULTICHOICE_DYNAMIC_STACK_SIZE 5
|
|
|
|
#define MULTICHOICE_DYNAMIC_STACK_INC 5
|
|
|
|
|
2019-09-18 23:57:25 +01:00
|
|
|
extern const u8 *const gStdStrings[];
|
2017-10-12 08:06:19 +01:00
|
|
|
|
2023-01-15 12:41:10 +00:00
|
|
|
struct DynamicMultichoiceStack
|
|
|
|
{
|
|
|
|
s32 top;
|
|
|
|
u32 capacity;
|
|
|
|
struct ListMenuItem *elements;
|
|
|
|
};
|
|
|
|
|
|
|
|
void MultichoiceDynamic_InitStack(u32 capacity);
|
|
|
|
void MultichoiceDynamic_ReallocStack(u32 newCapacity);
|
|
|
|
bool32 MultichoiceDynamic_StackFull(void);
|
|
|
|
bool32 MultichoiceDynamic_StackEmpty(void);
|
|
|
|
u32 MultichoiceDynamic_StackSize(void);
|
|
|
|
void MultichoiceDynamic_PushElement(struct ListMenuItem item);
|
|
|
|
struct ListMenuItem *MultichoiceDynamic_PopElement(void);
|
|
|
|
struct ListMenuItem *MultichoiceDynamic_PeekElement(void);
|
2023-01-16 21:40:36 +00:00
|
|
|
struct ListMenuItem *MultichoiceDynamic_PeekElementAt(u32 index);
|
2023-01-15 12:41:10 +00:00
|
|
|
void MultichoiceDynamic_DestroyStack(void);
|
2023-01-17 20:21:07 +00:00
|
|
|
bool8 ScriptMenu_MultichoiceDynamic(u8 left, u8 top, u8 argc, struct ListMenuItem *items, bool8 ignoreBPress, u8 maxBeforeScroll, u32 initialRow, u32 callbackSet);
|
2019-09-19 23:31:09 +01:00
|
|
|
bool8 ScriptMenu_Multichoice(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBPress);
|
|
|
|
bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBPress, u8 defaultChoice);
|
2023-11-23 20:31:33 +00:00
|
|
|
void DrawMultichoiceMenuInternal(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBPress, u8 cursorPos, const struct MenuAction *actions, int count);
|
2019-09-19 23:31:09 +01:00
|
|
|
bool8 ScriptMenu_YesNo(u8 left, u8 top);
|
|
|
|
bool8 ScriptMenu_MultichoiceGrid(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBPress, u8 columnCount);
|
|
|
|
bool8 ScriptMenu_ShowPokemonPic(u16 species, u8 x, u8 y);
|
2021-11-16 15:53:18 +00:00
|
|
|
bool8 (*ScriptMenu_HidePokemonPic(void))(void);
|
2019-09-19 23:31:09 +01:00
|
|
|
int ConvertPixelWidthToTileWidth(int width);
|
|
|
|
u8 CreateWindowFromRect(u8 x, u8 y, u8 width, u8 height);
|
|
|
|
void ClearToTransparentAndRemoveWindow(u8 windowId);
|
2022-07-29 15:17:58 +01:00
|
|
|
int DisplayTextAndGetWidth(const u8 *str, int width);
|
2019-09-19 23:31:09 +01:00
|
|
|
int ScriptMenu_AdjustLeftCoordFromWidth(int left, int width);
|
2019-09-19 22:26:25 +01:00
|
|
|
bool16 ScriptMenu_CreatePCMultichoice(void);
|
2019-03-02 07:44:02 +00:00
|
|
|
void ScriptMenu_DisplayPCStartupPrompt(void);
|
2017-10-12 08:06:19 +01:00
|
|
|
|
2017-10-13 16:09:36 +01:00
|
|
|
#endif //GUARD_SCRIPT_MENU_H
|