40 void OpenBugReporter();
70 #define MODE_INSTANCE_MAX_TEXTURES 64
73 #define MODE_INSTANCE_MAX_SURFACES 64
76 #define MODE_INSTANCE_MAX_THREADS 8
79 #define MODE_INSTANCE_DEBUG
82 #define MODE_INSTANCE_GUARDS
88 #define MODE_TOOLTIP_ANIMATION_TIME 1000
91 #define MODE_DRAW_CENTERED_SURFACE -0x7FFFFFF
94 #define MODE_IM_STILL_RUNNING 0x7FFFFFFF
97 #define CONTROL_MARGIN 4
100 #define MODE_INVALID_THREAD_ID 0
103 #define INVALID_SCHEDULE_ID 0xFFFFFFFF
115 #define DefineKeyControlStruct(INPUT_TYPE, KEY, DESC) { INPUT_TYPE, KEY, DESC }
290 friend int ModeThreadInstance_AsyncFunc(
void* ptr);
296 static void* sMainModeMutex;
309 THREAD_NOT_RUNNING = 0,
321 THREAD_DELETABLE = 4,
338 char m_ThreadName[128];
400 bool InitThread(
BaseModeInstance* pOwner, ModeCallback_OnThreadLoop pOnLoopFunc, ModeCallback_OnThreadComplete pOnCompleteFunc,
void* pUserData = NULL);
444 void End(
int iResult = 0);
474 friend extern void SetGameResolution(
int iNewWidth,
int iNewHeight,
int iNewMagnification);
477 friend extern void Platform::OpenBugReporter();
559 struct BASEMODE_SCREEN_GRAB_CACHE
572 static BASEMODE_SCREEN_GRAB_CACHE m_szScreenGrabData[3];
593 IgnoreWindow =
false;
594 RefreshAllModes =
false;
606 typedef void(*ModeCallback_OnEnd)(
BaseModeInstance* pMode,
const int& iResult,
bool& bDelete);
654 static int m_ModeCursorCount;
658 static FontObject* m_DefaultFont[10];
674 int m_AllocThreadCount;
737 unsigned int m_MRC_Time;
743 unsigned int m_KeyOld;
747 unsigned int m_KeyOld2;
751 unsigned int m_KeyOld_JOY;
971 static void ReloadFont(
const char* pFontName,
const char* pFontPath,
int iFontW = -1,
int iFontH = -1,
unsigned int iMagnification = 0);
987 bool IsTooltipOpen();
1069 static void DrawGame(
bool AllowACT =
true,
int OffsetX = 0,
int OffsetY = 0,
bool DoPutFade =
true,
bool bRunGameLogic =
true);
1073 static void DrawHUD(
int OffsetX = 0,
int OffsetY = 0);
1203 int AllocSurface(
int InsertIndex = -1,
int Width = WINDOW_WIDTH,
int Height = WINDOW_HEIGHT,
unsigned int iMagnification = 0);
1284 void DrawSurface(
int Index,
int X = 0,
int Y = 0,
unsigned char Alpha = 255,
bool AbsolutePos =
false);
1363 int AllocTexture(
int InsertIndex = -1,
int Width = WINDOW_WIDTH,
int Height = WINDOW_HEIGHT,
int BitsPerPixel = 32,
int Magnification = -1,
int WindowIndex = 0);
1404 void DrawTexture(
int Index,
int X = 0,
int Y = 0,
unsigned char Alpha = 255,
bool bSubPixels =
false,
bool bWrapCoordinates =
false);
1495 virtual void EndMode(
int value = 0x6FFFFFFF,
bool bSchedule =
false);
1528 virtual void SetDirty();
#define MODE_INSTANCE_MAX_THREADS
Maximum allocatable threads per mode instance.
Definition: CSMAPI_BaseModeInstance.h:76
MENU_CONTROLS_DRAW_FRAME
States of the menu control element.
Definition: CSMAPI_BaseModeInstance.h:150
@ NORMAL
Opened.
Definition: CSMAPI_BaseModeInstance.h:155
@ DEPRESSED
Closed.
Definition: CSMAPI_BaseModeInstance.h:158
@ ANIMATED
Being animated (opening, closing)
Definition: CSMAPI_BaseModeInstance.h:152
unsigned int EventScheduleId
The identifier for a schedule's ID.
Definition: CSMAPI_BaseModeInstance.h:59
#define MODE_INSTANCE_MAX_SURFACES
Maximum allocatable surfaces per mode instance.
Definition: CSMAPI_BaseModeInstance.h:73
MENU_CONTROLS_DRAW_POSITION
How to draw the menu controls.
Definition: CSMAPI_BaseModeInstance.h:130
@ CDP_BTM_RIGHT
Draw them in bottom right.
Definition: CSMAPI_BaseModeInstance.h:141
@ CDP_CENTER
Draw them in the middle of the screen.
Definition: CSMAPI_BaseModeInstance.h:144
@ CDP_TOP_LEFT
Draw them in the top left.
Definition: CSMAPI_BaseModeInstance.h:132
@ CDP_BTM_LEFT
Draw them in bottom left.
Definition: CSMAPI_BaseModeInstance.h:138
@ CDP_TOP_RIGHT
Draw them in top right.
Definition: CSMAPI_BaseModeInstance.h:135
MENU_CONTROLS_ACTS
Act descriptors for menu controls.
Definition: CSMAPI_BaseModeInstance.h:164
@ MCA_CLOSING
Closing.
Definition: CSMAPI_BaseModeInstance.h:172
@ MCA_CLOSED
Closed.
Definition: CSMAPI_BaseModeInstance.h:175
@ MCA_FIRST_OPEN
First open.
Definition: CSMAPI_BaseModeInstance.h:166
@ MCA_OPENED
Opened.
Definition: CSMAPI_BaseModeInstance.h:169
@ MCA_OPENING
Opening.
Definition: CSMAPI_BaseModeInstance.h:178
#define MODE_INSTANCE_MAX_TEXTURES
Maximum allocatable textures per mode instance.
Definition: CSMAPI_BaseModeInstance.h:70
KEY_CONTROL_INPUT_TYPE
The type of key input to expect from a KeyControlStruct.
Definition: CSMAPI_BaseModeInstance.h:184
@ KCIT_MOUSE
Mouse input.
Definition: CSMAPI_BaseModeInstance.h:195
@ KCIT_KEY2
Key2 input (gKey2, gKeyTrg2)
Definition: CSMAPI_BaseModeInstance.h:189
@ KCIT_KEY
Normal input (gKey, gKeyTrg)
Definition: CSMAPI_BaseModeInstance.h:186
@ KCIT_KEY3
Key3 input (gKey3, gKeyTrg3)
Definition: CSMAPI_BaseModeInstance.h:192
unsigned int ModeThreadId
The identifier for a ModeThreadInstance's ID.
Definition: CSMAPI_BaseModeInstance.h:55
MODE_GLOBAL_CONFIG_TYPE
Global variables for BaseModeInstance classes.
Definition: CSMAPI_BaseModeInstance.h:122
@ GCT_IGNORE_WINDOW_DEFAULT
Defines the default value for m_ModeConfig.IgnoreWindow.
Definition: CSMAPI_BaseModeInstance.h:124
void(* EventSchedulePayloadFunc)(BaseModeInstance *pOwner, void *pUserData)
The function structure of a payload for 'EventScheduleStruct'.
Definition: CSMAPI_BaseModeInstance.h:65
CSMP_CURSOR_TYPE
All possible cursor types for BaseModeInstance::SetCursor.
Definition: CSMAPI_enums.h:1168
Surface_Ids
List of surface IDs.
Definition: CSMAPI_enums.h:714
GameProcessMode
Controls what the game is currently doing.
Definition: CSMAPI_enums.h:970
KeyInputType
Key input types.
Definition: CSMAPI_enums.h:66
@ KIT_Key
gKey and gKeyTrg
Definition: CSMAPI_enums.h:68
Holds all global config variables for BaseModeInstance.
Definition: CSMAPI_BaseModeInstance.h:579
GLOBAL_CONFIG_STRUCT()
Constructor.
Definition: CSMAPI_BaseModeInstance.h:591
bool IgnoreWindow
Default value for m_ModeConfig.IgnoreWindow.
Definition: CSMAPI_BaseModeInstance.h:583
bool RefreshAllModes
Default value for m_ModeConfig.IgnoreWindow.
Definition: CSMAPI_BaseModeInstance.h:587
Easy UI management.
Definition: CSMAPI_BaseModeInstance.h:469
virtual void ProcessLogic()=0
Process the logic of this menu.
static void DrawHUD(int OffsetX=0, int OffsetY=0)
Draw HUD.
void * m_PrivData
Pointer to private data structure, defined by each mode.
Definition: CSMAPI_BaseModeInstance.h:818
virtual int GetRelativeScreenHeight()
Get the game window's height relative to this mode.
static GameProcessMode ShowTutorialPages(BaseModeInstance *pCaller, int iPageCount,...)
Show a messagebox that allows the user to scroll through a list of tutorial pages.
static bool CancelSchedule(EventScheduleId iEventId)
BaseModeInstance()
Initialize certain values.
virtual void QueryMenuControls(KeyControlStruct pControlBuffer[32], int &pControlCount, bool &bStackControls)
Ask the mode to populate pControlBuffer with its control scheme.
int GetTextureCenteredX(int Index)
Get the screen-centered X position of a texture.
int AllocTexture(int InsertIndex=-1, int Width=WINDOW_WIDTH, int Height=WINDOW_HEIGHT, int BitsPerPixel=32, int Magnification=-1, int WindowIndex=0)
Allocate private resources.
virtual void ProcessKeys()=0
Process key input.
static void ShowCursor()
Show the cursor.
int GetTextureCenteredY(int Index)
Get the screen-centered Y position of a texture.
int AllocSurface(int InsertIndex=-1, int Width=WINDOW_WIDTH, int Height=WINDOW_HEIGHT, unsigned int iMagnification=0)
Allocate private resources.
int LoadImageToTexture(const char *FileName, int InsertIndex=-1)
Allocate private resources.
void DrawTexture(int Index, int X=0, int Y=0, unsigned char Alpha=255, bool bSubPixels=false, bool bWrapCoordinates=false)
Draw an allocated texture onto the screen.
void DrawSurface(int Index, int X=0, int Y=0, unsigned char Alpha=255, bool AbsolutePos=false)
Draw an allocated surface on the screen.
static void ProcessScheduleList()
Process all schedules.
int LoadImageToSurface(const char *FileName, int InsertIndex=-1)
Allocate private resources.
void SetTooltipPosition(GUI_POINT new_position)
Set the tooltip's position.
void ProcessTooltips()
Process the current & old tooltips.
virtual void SetDirty()
Set this mode as dirty.
Definition: CSMAPI_BaseModeInstance.h:1577
int LoadSurfaceIDToSurface(Surface_Ids SurfaceID, int InsertIndex=-1)
Allocate private resources.
ModeConfiguration * GetModeConfig()
Get a pointer to this mode's config.
Definition: CSMAPI_BaseModeInstance.h:1572
virtual int GetRelativeScreenWidth()
Get the game window's width relative to this mode.
int GetSurfaceHeight(int Index)
Get the height of an allocated surface.
ToolTipStruct m_CurTooltip
The tooltip that is currently being shown.
Definition: CSMAPI_BaseModeInstance.h:684
virtual GUI_POINT TranslateMousePosition(GUI_POINT *pMouseInput)
Translate the mouse position to relative coordinates.
void SetMenuControlsAct(MENU_CONTROLS_ACTS NewAct)
Set the act number of the menu controls menu.
void SetModePaused(bool bValue)
Set the 'paused' value for this mode.
bool GrabScreen()
Backup the screen to a surface.
GUI_POINT GetTextureRelativeMousePoint(int Index)
Get the current mouse position relative to a texture.
uint32_t GetRectHoverTime(GUI_POINT mouse_point, GUI_RECT rect)
A helper method.
static GLOBAL_CONFIG_STRUCT g_GlobalConfig
The global configuration.
Definition: CSMAPI_BaseModeInstance.h:600
virtual void Draw()=0
Draw rendered surfaces.
GUI_POINT GetTextureCentered(int Index)
Get the screen-centered position of a texture.
int GetTextureHeight(int Index, bool Magnified=true)
Get the height of an allocated texture.
ModeConfiguration m_ModeConfig
The configuration for this mode.
Definition: CSMAPI_BaseModeInstance.h:757
void ResetMode()
Reset the mode.
virtual GUI_POINT TranslateMousePosition(GUI_POINT *pMouseInput, const GUI_POINT &pWindowOffset)
Translate the mouse position to relative coordinates.
void UpdateScreenGrab()
Update the screen grab surface.
int GetSelectedTexture()
Get the currently selected texture.
static void ReloadFont(const char *pFontName, const char *pFontPath, int iFontW=-1, int iFontH=-1, unsigned int iMagnification=0)
Reload the default font.
static void DrawControls(MENU_CONTROLS_DRAW_POSITION DrawPosition, Surface_Ids destSID, const KeyControlStruct *Buttons, int ButtonCount, bool Flash=false, bool StackControls=false, int Alpha=255, unsigned int CustomMagnification=0)
Draw standard controls.
bool m_Dirty
Controls whether this mode should re-render.
Definition: CSMAPI_BaseModeInstance.h:795
bool CreateTextureTooltip(GUI_POINT point, FontObject *font, const char *text, int life_time=5000, int Magnification=-1)
Create a texture tooltip.
void FreeSurface(int Index)
Free a previously allocated surface.
void DoEscapeMenu()
Open the escape menu.
void SelectSurface(int Index)
Select a previously allocated surface.
void DrawMenuControls(MENU_CONTROLS_DRAW_POSITION DrawPosition, MENU_CONTROLS_DRAW_FRAME DrawFrame)
Draw the menu control surfaces generated by CreateMenuControls.
ToolTipStruct m_OldTooltip
The tooltip that is fading out.
Definition: CSMAPI_BaseModeInstance.h:680
bool StopThread(ModeThreadId iThreadId, bool bWaitForFinish=false)
Stop a thread.
int GetCenteredX(int Index)
Get the screen-centered X position of a surface.
virtual int DoMode()
Run this mode until it stops.
static void CancelAllModeSchedules(BaseModeInstance *pMode)
virtual int ModePixelToScreenPixel(int iInput)
Convert a mode coordinate to screen coordinates.
void DrawScreenGrab()
Draw the backed up screen.
GUI_POINT GetRelativeMousePosition(int iIndex)
Get the mouse position relative to a surface.
virtual void EndMode(int value=0x6FFFFFFF, bool bSchedule=false)
End this mode.
void SelectTexture(int Index)
Select a previously allocated surface.
int m_RetValue
Controls the return value of DoMode() internally.
Definition: CSMAPI_BaseModeInstance.h:812
virtual void PreRender()=0
Render everything to surfaces.
bool CreateMenuControls(const KeyControlStruct *Buttons, int ButtonCount, bool StackControls=false)
Create control surfaces.
ModeThreadId StartAsyncOperation(ModeThreadInstance::ModeCallback_OnThreadLoop pOnLoopFunc, ModeThreadInstance::ModeCallback_OnThreadComplete pOnCompleteFunc=NULL, void *pUserData=NULL)
Begin a thread-safe asynchronous operation.
static CSMP_CURSOR_TYPE GetCursor(GUI_RECT **pRect=NULL, int *pEventId=NULL)
Get the current cursor type.
virtual int Init()=0
Initialize this mode.
static void DrawGame(bool AllowACT=true, int OffsetX=0, int OffsetY=0, bool DoPutFade=true, bool bRunGameLogic=true)
Draw game elements.
Surface_Ids m_ScreenGrabSurf
The screen grab surface ID.
Definition: CSMAPI_BaseModeInstance.h:791
static void SetCursor(CSMP_CURSOR_TYPE iType, int iEventId=-1, GUI_RECT *pRect=NULL)
Set the current cursor.
bool IsModeFreeRunning()
Check to see if this mode is running in freerun mode.
void FreeTexture(int Index)
Free a previously allocated texture.
int DrawBasicWindow(GUI_RECT *pRect=NULL)
Draw a basic window.
virtual void ProcessMouse(GUI_POINT mouse_point)=0
Process this menu's mouse.
void FreeAllSurfaces()
Free all allocated surfaces.
void InitControlMenu()
Initialize the control menu.
virtual int GetMagnification()
Fetch the magnification level for this UI.
void DrawTooltips()
Draw the current & old tooltips.
static void ReloadOpenModes()
Reload all currently opened modes.
static FontObject * GetDefaultFont(unsigned int iMagnification=0)
Get the default font that all GUIs should use.
int GetRetValue()
Get the return value for this mode.
bool IsFocusedMode()
Check to see if this mode is the currently focused mode.
bool IsTooltipOpen()
Check to see if a tooltip is open.
Definition: CSMAPI_BaseModeInstance.h:1582
bool IsLocalSurfaceAllocated(int Index)
Check to see if a surface at a given local index is allocated.
void SetRetValue(int value)
Set the return value.
void ReleaseScreenGrab()
Release this mode's screengrab.
bool CloseTooltip(bool fade_out=true)
Close the currently opened tooltip.
void FreeAllTextures()
Free all allocated textures.
virtual void PostDraw()
Draw rendered surfaces over top of everything else.
Definition: CSMAPI_BaseModeInstance.h:877
VideoTexture * GetLocalVideoTexture(int LocalIndex)
Get a locally allocated video texture object by its index.
static void ScheduleReloadOpenModes()
Reload all currently opened modes.
bool m_FreeCall
Controls whether this mode is in free-call mode.
Definition: CSMAPI_BaseModeInstance.h:803
int GetCenteredY(int Index)
Get the screen-centered Y position of a surface.
static void HideCursor()
Hide the cursor.
bool m_End
Controls whether this mode should end.
Definition: CSMAPI_BaseModeInstance.h:799
int GlobalSurfaceIndexToLocal(Surface_Ids sId)
Convert the global index of a surface to a local index.
bool IsControlMenuOpen()
Check to see if the control menu is open.
MENU_CONTROLS_ACTS GetMenuControlsAct()
Get the act number of the menu controls menu.
int GetTextureWidth(int Index, bool Magnified=true)
Get the width of an allocated texture.
void RemoveKey(int iInputFlags, KeyInputType iType=KeyInputType::KIT_Key)
Remove key inputs after processing them.
ModeCallback_OnEnd OnEnd
This is called when the mode is ending, just before 'Free()'.
Definition: CSMAPI_BaseModeInstance.h:722
int LoadSurfaceIDToTexture(Surface_Ids SurfaceID, int InsertIndex=-1)
Allocate private resources.
void ResetRectHover()
Reset rect hover system.
static void RunGameLogic(bool AllowACT=true)
Run game logic.
void StartAllNewThreads()
Start all new threads.
void FinishTexture(int Index)
Finish drawing a texture.
int GetSelectedSurface()
Get the currently selected surface.
static GUI_POINT GetControlKeySize(const KeyControlStruct *Buttons, int ButtonCount, bool StackControls=false, unsigned int CustomMagnification=0)
Get the size of what DrawControls() would output to the screen.
virtual int Free()=0
De-initialize this mode.
GUI_RECT * GetTooltipRect()
Get a pointer to the tooltip's rect.
Surface_Ids LocalSurfaceIndexToGlobal(int Index)
Convert the local index of a surface we own to a global index.
int GetSurfaceWidth(int Index)
Get the width of an allocated surface.
virtual bool ModeTick()
Run this mode for one frame.
static void SetGlobalConfig(MODE_GLOBAL_CONFIG_TYPE eType, const char *pValue)
Set the value of a global config variable.
bool IsLocalTextureAllocated(int Index)
Check to see if a texture at a given local index is allocated.
void ReloadMode()
Reload this mode.
static bool IsSchedulePending(EventScheduleId iEventId)
static EventScheduleId Schedule(unsigned int iDelay, EventSchedulePayloadFunc pPayloadFunc, void *pUserData=NULL, BaseModeInstance *pOwner=NULL)
Schedule an event for later.
void EnforceBasicWindowSize(GUI_RECT *pRect)
Ensure a rect conforms to the size of a basic window.
void FreeAllThreads()
Stop & wait for all threads to finish.
bool m_FreeCall_Paused
Controls whether this mode is paused or not.
Definition: CSMAPI_BaseModeInstance.h:807
bool CreateTooltip(GUI_POINT point, FontObject *font, const char *text, int life_time=5000)
Create a tooltip.
virtual bool StartMode()
Initialize the mode in free-call mode.
An external window to render stuff on.
Definition: ExternalWindow.h:151
Easy multi-threading for modes.
Definition: CSMAPI_BaseModeInstance.h:288
ModeThreadId m_ThreadId
This thread's local ID.
Definition: CSMAPI_BaseModeInstance.h:342
void End(int iResult=0)
End the thread.
BaseModeInstance * m_Owner
The owner of this thread.
Definition: CSMAPI_BaseModeInstance.h:354
void * m_UserData
Function callback userdata.
Definition: CSMAPI_BaseModeInstance.h:378
ModeThreadInstance()
Main constructor.
void WaitToFinish()
Wait for the thread to finish.
bool InitThread(BaseModeInstance *pOwner, ModeCallback_OnThreadLoop pOnLoopFunc, ModeCallback_OnThreadComplete pOnCompleteFunc, void *pUserData=NULL)
Initialize this thread instance.
void LockUnique()
Lock a critical part of code.
void * m_Mutex
This thread's unique mutex.
Definition: CSMAPI_BaseModeInstance.h:362
~ModeThreadInstance()
Deconstructor.
void Detach()
Detach this thread.
int GetResult()
Get the return result.
void __Complete_And_Send_Result__()
Complete this mode.
void UnlockUnique()
Unlock a critical part of code.
static void Lock()
Lock a critical part of code.
ModeCallback_OnThreadComplete m_OnLoop
Called every frame.
Definition: CSMAPI_BaseModeInstance.h:350
static void Unlock()
Unlock a critical part of code.
static bool TryLock()
Try to lock a critical part of code.
bool TryLockUnique()
Try to lock a critical part of code.
void(* ModeCallback_OnThreadComplete)(BaseModeInstance *pMode, ModeThreadInstance *pThread, void *pUserData)
Callback function for when a thread completes.
Definition: CSMAPI_BaseModeInstance.h:328
ThreadState
Thread states.
Definition: CSMAPI_BaseModeInstance.h:307
ThreadState m_State
The state of this thread.
Definition: CSMAPI_BaseModeInstance.h:366
ModeCallback_OnThreadComplete m_OnComplete
Called when the asynchronous operation ends, by any means.
Definition: CSMAPI_BaseModeInstance.h:346
bool m_Running
This is controlled by the async function.
Definition: CSMAPI_BaseModeInstance.h:370
void(* ModeCallback_OnThreadLoop)(BaseModeInstance *pMode, ModeThreadInstance *pThread, void *pUserData)
Callback function for when a thread completes.
Definition: CSMAPI_BaseModeInstance.h:332
int m_Result
The result from the async operation.
Definition: CSMAPI_BaseModeInstance.h:374
bool Start()
Start the thread.
void * m_Thread
The thread for this mode.
Definition: CSMAPI_BaseModeInstance.h:358
An editable texture API.
Definition: VideoTexture.h:51
#define CAVESTORY_MOD_API
Exports / imports Cavestory Mod API functions & classes.
Definition: CSMAPI_begincode.h:30
Configuration class for BaseModeInstance.
Definition: CSMAPI_BaseModeInstance.h:484
int OpenedAlpha
The alpha value when the menu controls are opened (0 - 255)
Definition: CSMAPI_BaseModeInstance.h:543
int HideTime
The amount of time it takes to close the menu controls.
Definition: CSMAPI_BaseModeInstance.h:551
bool AllowKeyControl
Allow keyboard control – If false, then BaseModeInstance::ProcessKeys is not called.
Definition: CSMAPI_BaseModeInstance.h:495
bool IgnoreWindow
Ignore window input requirement - If true, ProcessKeys and ProcessMouse will always be queried regard...
Definition: CSMAPI_BaseModeInstance.h:491
int ClosedAlpha
The alpha value when the menu controls are closed (0 - 255)
Definition: CSMAPI_BaseModeInstance.h:539
bool OpenOnTab
Open when 'TAB' is pressed.
Definition: CSMAPI_BaseModeInstance.h:531
bool Enabled
If menu controls are actually enabled.
Definition: CSMAPI_BaseModeInstance.h:519
unsigned int CustomMagnification
The return code that pressing Alt+F4 should provide.
Definition: CSMAPI_BaseModeInstance.h:511
bool OpenOnHover
Open when hovered over.
Definition: CSMAPI_BaseModeInstance.h:535
bool AllowMouseControl
Allow mouse control – If false, then BaseModeInstance::ProcessMouse is not called.
Definition: CSMAPI_BaseModeInstance.h:499
int FrameTime
The amount of time it takes to open the menu controls.
Definition: CSMAPI_BaseModeInstance.h:547
MENU_CONTROLS_DRAW_POSITION DrawPosition
The draw position for menu controls.
Definition: CSMAPI_BaseModeInstance.h:523
int AltF4RetValue
The return code that pressing Alt+F4 should provide.
Definition: CSMAPI_BaseModeInstance.h:507
bool AllowAutoHide
Automatically hide the menu controls after a while.
Definition: CSMAPI_BaseModeInstance.h:527
bool ProcessMouseOnMove
Only process mouse on movement – If true, then BaseModeInstance::ProcessMouse will only be called whe...
Definition: CSMAPI_BaseModeInstance.h:503
ExternalWindow * Window
The external window this mode belongs to.
Definition: CSMAPI_BaseModeInstance.h:487
Scheduled Event Info.
Definition: CSMAPI_BaseModeInstance.h:222
EventScheduleId id
The ID for this schedule.
Definition: CSMAPI_BaseModeInstance.h:225
BaseModeInstance * executor
The mode that scheduled this event.
Definition: CSMAPI_BaseModeInstance.h:233
EventScheduleStruct * next
The next event in the link.
Definition: CSMAPI_BaseModeInstance.h:249
bool is_executing
Whether or not this schedule is already being executed.
Definition: CSMAPI_BaseModeInstance.h:245
unsigned long long int end_time
The timestamp that GetTicks() should reach for this schedule to execute its payload.
Definition: CSMAPI_BaseModeInstance.h:229
void * user_data
The user data to be included in the payload call.
Definition: CSMAPI_BaseModeInstance.h:241
EventSchedulePayloadFunc payload
The payload function.
Definition: CSMAPI_BaseModeInstance.h:237
Manages points.
Definition: CSMAPI_types.h:546
Definition: CSMAPI_types.h:842
For MenuControls.
Definition: CSMAPI_BaseModeInstance.h:203
KEY_CONTROL_INPUT_TYPE Type
The type of input to expect.
Definition: CSMAPI_BaseModeInstance.h:206
char Desc[128]
The description of what happens when you press this button.
Definition: CSMAPI_BaseModeInstance.h:214
int Key
What button to display (gKeyShot, gKeyCancel, etc.) Only takes one trigger flag, so don't include mor...
Definition: CSMAPI_BaseModeInstance.h:210