mirror of
https://github.com/pret/pokeemerald.git
synced 2026-09-30 05:53:57 -05:00
Merge branch 'feature/dynmulti' into feature/dynmulti-expansion
This commit is contained in:
@@ -1,11 +1,37 @@
|
||||
#ifndef GUARD_SCRIPT_MENU_H
|
||||
#define GUARD_SCRIPT_MENU_H
|
||||
|
||||
#include "list_menu.h"
|
||||
#include "constants/script_menu.h"
|
||||
#include "menu.h"
|
||||
|
||||
// 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
|
||||
|
||||
extern const u8 *const gStdStrings[];
|
||||
|
||||
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);
|
||||
struct ListMenuItem *MultichoiceDynamic_PeekElementAt(u32 index);
|
||||
void MultichoiceDynamic_DestroyStack(void);
|
||||
bool8 ScriptMenu_MultichoiceDynamic(u8 left, u8 top, u8 argc, struct ListMenuItem *items, bool8 ignoreBPress, u8 maxBeforeScroll, u32 initialRow, u32 callbackSet);
|
||||
bool8 ScriptMenu_Multichoice(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBPress);
|
||||
bool8 ScriptMenu_MultichoiceWithDefault(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBPress, u8 defaultChoice);
|
||||
void DrawMultichoiceMenuInternal(u8 left, u8 top, u8 multichoiceId, bool8 ignoreBPress, u8 cursorPos, const struct MenuAction *actions, int count);
|
||||
|
||||
Reference in New Issue
Block a user