Path: blob/master/SonicMania/Objects/Menu/UIButton.h
338 views
#ifndef OBJ_UIBUTTON_H1#define OBJ_UIBUTTON_H23#include "Game.h"45typedef enum {6UIBUTTON_ALIGN_LEFT,7UIBUTTON_ALIGN_CENTER,8UIBUTTON_ALIGN_RIGHT,9} UIButtonAlignments;1011// Object Class12struct ObjectUIButton {13RSDK_OBJECT14};1516// Entity Class17struct EntityUIButton {18MANIA_UI_ITEM_BASE19Vector2 size;20int32 listID;21int32 frameID;22int32 align;23int32 choiceCount;24uint8 choiceDir;25bool32 invisible;26bool32 assignsP1;27bool32 freeBindP2;28bool32 transition;29bool32 stopMusic;30bool32 isDisabled;31int32 bgEdgeSize;32int32 textBounceOffset;33int32 buttonBounceOffset;34int32 textBounceVelocity;35int32 buttonBounceVelocity;36bool32 textVisible;37bool32 clearParentState;38Vector2 firstChoicePos;39int32 selection;40void (*choiceChangeCB)(void);41Animator animator;42uint16 textFrames;43int32 startListID;44int32 startFrameID;45};4647// Object Struct48extern ObjectUIButton *UIButton;4950// Standard Entity Events51void UIButton_Update(void);52void UIButton_LateUpdate(void);53void UIButton_StaticUpdate(void);54void UIButton_Draw(void);55void UIButton_Create(void *data);56void UIButton_StageLoad(void);57#if GAME_INCLUDE_EDITOR58void UIButton_EditorDraw(void);59void UIButton_EditorLoad(void);60#endif61void UIButton_Serialize(void);6263// Extra Entity Functions64void UIButton_ManageChoices(EntityUIButton *button);65EntityUIButton *UIButton_GetChoicePtr(EntityUIButton *button, int32 selection);66void UIButton_SetChoiceSelectionWithCB(EntityUIButton *button, int32 selection);67void UIButton_SetChoiceSelection(EntityUIButton *button, int32 selection);68void *UIButton_GetActionCB(void);69void UIButton_FailCB(void);70void UIButton_ProcessButtonCB_Scroll(void);71bool32 UIButton_ProcessTouchCB_Multi(void);72bool32 UIButton_ProcessTouchCB_Single(void);73void UIButton_ProcessButtonCB(void);74bool32 UIButton_CheckButtonEnterCB(void);75bool32 UIButton_CheckSelectedCB(void);76void UIButton_ButtonEnterCB(void);77void UIButton_ButtonLeaveCB(void);78void UIButton_SelectedCB(void);79void UIButton_State_HandleButtonLeave(void);80void UIButton_State_HandleButtonEnter(void);81void UIButton_State_Selected(void);8283#endif //! OBJ_UIBUTTON_H848586