Cavestory Mod API
Classes | Typedefs | Enumerations | Functions | Variables
GUI

Graphical user interface functions. More...

Classes

class  BaseModInterface
 The base mod interface. More...
 
struct  SpecialTextNode
 A node for SpecialTextCache. More...
 
struct  SpecialTextCache
 A cache object to store parsed special text. More...
 
struct  CacheSurface
 Rendering pipeline for Cavestory Multiplayer. More...
 
class  MessageBoxButton
 Message box button. More...
 
class  MessageBoxMode
 Message box mode. More...
 
struct  MessageBoxMode::MessageBoxConfigStruct
 Configuration for MessageBoxMode. More...
 
class  GuiBase
 The base class for GUI elements. More...
 
class  CenteredTextInfo
 Draw centered text. More...
 
class  LabelInfo
 Text. More...
 
class  SelectableLabelInfo
 Text. More...
 
class  ScrollAreaInfo
 A scroll area. More...
 
class  TextInputInfo
 Show a text input box. More...
 
class  KeyInputInfo
 Show a text input box. More...
 
class  CheckBoxInfo
 Show a toggleable checkbox. More...
 
class  SliderIntInfo
 Show a number slider. More...
 
class  ButtonInfo
 Show a clickable button. More...
 
class  DropdownBoxInfo
 Show a dropdown box. More...
 
class  ColorPickerInfo
 Several combined GUI elements to form a color picker. More...
 
class  DraggableWindowInfo
 Show a clickable button. More...
 
class  GroupBoxInfo
 Show a windows-style group box. More...
 
class  TabBookInfo
 Show a tab selector. More...
 
struct  ModeInputOptionConfig
 Advanced configuration for a ModeInputOption. More...
 
struct  ModeInputOption
 ModeInputVector's input object. More...
 
class  ModeInputVector
 A helpful 2D vector class to manage mode input. More...
 

Typedefs

typedef unsigned int ModeInputSelectionId
 Used for ModeInputOption.
 
typedef unsigned int ModeInputIndex
 For ModeInputVector's indexes.
 
typedef int ModeInputOptionCoord
 Coordinate type for ModeInputOption.
 

Enumerations

enum  ModeInputButtonState { MIBS_NORMAL = 0 , MIBS_HOVERED = 1 , MIBS_PRESSED = 2 }
 Controls the button states for non-GUI driven ModeInputOption s. More...
 

Functions

CAVESTORY_MOD_API void CSM_QSA_Begin (Surface_Ids sid, GUI_RECT *rect, CSM_QSA_Data *out)
 Begin the quick surface access.
 
CAVESTORY_MOD_API void CSM_QSA_Free (CSM_QSA_Data *qsaptr)
 Free QSA access.
 
CAVESTORY_MOD_API void PutFramePerSecound ()
 Draw FPS in the top-right corner.
 
CAVESTORY_MOD_API BOOL Flip_SystemTask (int hWnd)
 Flip the renderer. More...
 
CAVESTORY_MOD_API void PutBitmap3 (RECT *rcView, int x, int y, RECT *rect, Surface_Ids surf_no)
 Draw bitmap to the screen with transparency. More...
 
CAVESTORY_MOD_API void PutBitmap4 (RECT *rcView, int x, int y, RECT *rect, Surface_Ids surf_no)
 Draw bitmap to the screen. More...
 
CAVESTORY_MOD_API void PutBitmap5 (RECT *rcView, int x, int y, RECT *rect, Surface_Ids surf_no, int scalar)
 Draw bitmap to the screen. More...
 
CAVESTORY_MOD_API void PutBitmap6 (RECT *rcView, int x, int y, RECT *rect, Surface_Ids surf_no, int scalar)
 Draw bitmap to the screen. More...
 
CAVESTORY_MOD_API void PutBitmap7 (RECT *rcView, int x, int y, RECT *rect, Surface_Ids surf_no)
 Draw bitmap to the screen. More...
 
CAVESTORY_MOD_API void PutBitmap8 (RECT *rcView, int x, int y, RECT *rect, Surface_Ids surf_no, int r, int g, int b)
 Draw bitmap to the screen. More...
 
CAVESTORY_MOD_API void PutBitmap9 (RECT *rcView, int x, int y, RECT *rect, Surface_Ids surf_no, int alpha)
 Draw bitmap to the screen. More...
 
CAVESTORY_MOD_API void PutBitmap10 (int x, int y, RECT *rect, Surface_Ids surf_no)
 Draw bitmap to the screen. More...
 
CAVESTORY_MOD_API void PutBitmap11 (int x, int y, RECT *rect, Surface_Ids surf_no, int r, int g, int b)
 Draw bitmap to the screen. More...
 
CAVESTORY_MOD_API void PutBitmap12 (RECT *rcView, Surface_Ids dst_surf_no, int x, int y, RECT *src_rect, Surface_Ids src_surf_no, bool async=false)
 Draw bitmap to the screen with transparency. More...
 
CAVESTORY_MOD_API void PutBitmap13 (RECT *rcView, Surface_Ids dst_surf_no, int x, int y, RECT *src_rect, Surface_Ids src_surf_no, int r, int g, int b, bool async=false)
 Draw bitmap to the screen with transparency & color modulation. More...
 
CAVESTORY_MOD_API void PutBitmap14 (int x, int y, int w, int h, RECT *rect, Surface_Ids surf_no, int r, int g, int b)
 Draw a stretched colored bitmap to the screen. More...
 
CAVESTORY_MOD_API void PutBitmap15 (RECT *pDstRect, RECT *pSrcRect, Surface_Ids iSurfaceNo)
 Draw a surface directly to the screen. More...
 
CAVESTORY_MOD_API void PutBitmap16 (RECT *rcView, int x, int y, RECT *rect, Surface_Ids surf_no, float angle, int center_x, int center_y)
 Draw a bitmap that's rotated around a center point. More...
 
CAVESTORY_MOD_API void PutBitmap17 (RECT *pDstRect, RECT *pSrcRect, Surface_Ids iSurfaceNo)
 Draw a surface directly to the screen, with magnified support. More...
 
CAVESTORY_MOD_API void PutBitmap18 (RECT *pDstRect, RECT *pSrcRect, Surface_Ids iSurfaceNo, Surface_Ids iDestSurfaceNo)
 Draw a surface directly to another surface, with magnified support. More...
 
CAVESTORY_MOD_API void ModBitmap (Surface_Ids iSurfNo, unsigned long iColor)
 Set the color modulation of a surface. More...
 
CAVESTORY_MOD_API void ClearBitmapMod (Surface_Ids iSurfNo)
 Clear the color modulation of a surface. More...
 
CAVESTORY_MOD_API void PutNumber3 (int x, int y, int value)
 Draw a number to the screen. More...
 
CAVESTORY_MOD_API void PutNumber4 (int x, int y, int value, BOOL bZero)
 Draw a number to the screen. More...
 
CAVESTORY_MOD_API void PutSpecificNpChar (NPCHAR *npc, int fx, int fy, bool bIgnorePutFunc=false, int *iDrawX=NULL, int *iDrawY=NULL)
 Draw an NPC to the screen. More...
 

Variables

CAVESTORY_MOD_API int ghWnd
 Placeholder until we restore the WinAPI code.
 
struct CAVESTORY_MOD_API MessageBoxMode::MessageBoxConfigStruct MessageBoxMode::m_Config
 

Detailed Description

Graphical user interface functions.

GUI drawing & planning.

Enumeration Type Documentation

◆ ModeInputButtonState

Controls the button states for non-GUI driven ModeInputOption s.

Enumerator
MIBS_NORMAL 

Normal draw type.

MIBS_HOVERED 

Button is being hovered over.

MIBS_PRESSED 

Button is being pressed.

Function Documentation

◆ ClearBitmapMod()

CAVESTORY_MOD_API void ClearBitmapMod ( Surface_Ids  iSurfNo)

Clear the color modulation of a surface.

Parameters
iSurfNoThe surface whose color modulation should be reset.

◆ Flip_SystemTask()

CAVESTORY_MOD_API BOOL Flip_SystemTask ( int  hWnd)

Flip the renderer.

Parameters
hWndghWnd
Returns
Returns true if the application can continue.

◆ ModBitmap()

CAVESTORY_MOD_API void ModBitmap ( Surface_Ids  iSurfNo,
unsigned long  iColor 
)

Set the color modulation of a surface.

Parameters
iSurfNoThe surface number.
iColorThe desired of the surface. Use CSM_RGB or CSM_RGBA.

◆ PutBitmap10()

CAVESTORY_MOD_API void PutBitmap10 ( int  x,
int  y,
RECT rect,
Surface_Ids  surf_no 
)

Draw bitmap to the screen.

Parameters
xThe X position.
yThe Y position.
rectThe source rect to draw.
surf_noWhere to get the image to draw from.

◆ PutBitmap11()

CAVESTORY_MOD_API void PutBitmap11 ( int  x,
int  y,
RECT rect,
Surface_Ids  surf_no,
int  r,
int  g,
int  b 
)

Draw bitmap to the screen.

Parameters
xThe X position.
yThe Y position.
rectThe source rect to draw.
surf_noWhere to get the image to draw from.
rThe red modulation color
gThe green modulation color
bThe blue modulation color

◆ PutBitmap12()

CAVESTORY_MOD_API void PutBitmap12 ( RECT rcView,
Surface_Ids  dst_surf_no,
int  x,
int  y,
RECT src_rect,
Surface_Ids  src_surf_no,
bool  async = false 
)

Draw bitmap to the screen with transparency.

Parameters
dst_surf_noThe surface number of the destination.
xThe X position.
yThe Y position.
src_rectThe source rect for the image. Can be NULL.
src_surf_noThe source surface number to copy from.
asyncWhether this is an asynchronous call or not.

◆ PutBitmap13()

CAVESTORY_MOD_API void PutBitmap13 ( RECT rcView,
Surface_Ids  dst_surf_no,
int  x,
int  y,
RECT src_rect,
Surface_Ids  src_surf_no,
int  r,
int  g,
int  b,
bool  async = false 
)

Draw bitmap to the screen with transparency & color modulation.

Parameters
dst_surf_noThe surface number of the destination.
xThe X position.
yThe Y position.
src_rectThe source rect for the image. Can be NULL.
src_surf_noThe source surface number to copy from.
rThe red value.
gThe green value.
bThe blue value.
asyncWhether this is an asynchronous call or not.

◆ PutBitmap14()

CAVESTORY_MOD_API void PutBitmap14 ( int  x,
int  y,
int  w,
int  h,
RECT rect,
Surface_Ids  surf_no,
int  r,
int  g,
int  b 
)

Draw a stretched colored bitmap to the screen.

Parameters
xThe X position.
yThe Y position.
wThe width.
hThe height.
rectThe source rect to draw.
surf_noWhere to get the image to draw from.
rThe red modulation color
gThe green modulation color
bThe blue modulation color

◆ PutBitmap15()

CAVESTORY_MOD_API void PutBitmap15 ( RECT pDstRect,
RECT pSrcRect,
Surface_Ids  iSurfaceNo 
)

Draw a surface directly to the screen.

Parameters
pDstRectThe destination rect to draw the bitmap at on the screen.
pSrcRectThe source rect to draw.
iSurfaceNoWhere to get the image to draw from.

◆ PutBitmap16()

CAVESTORY_MOD_API void PutBitmap16 ( RECT rcView,
int  x,
int  y,
RECT rect,
Surface_Ids  surf_no,
float  angle,
int  center_x,
int  center_y 
)

Draw a bitmap that's rotated around a center point.

Parameters
rcViewThe clip rect to use.
xThe X position.
yThe Y position.
rectThe source rect to draw.
surf_noWhere to get the image to draw from.
angleThe angle at which to draw the bitmap.
center_xThe rotation center of the sprite.
center_yThe rotation center of the sprite.

◆ PutBitmap17()

CAVESTORY_MOD_API void PutBitmap17 ( RECT pDstRect,
RECT pSrcRect,
Surface_Ids  iSurfaceNo 
)

Draw a surface directly to the screen, with magnified support.

Parameters
pDstRectThe destination rect to draw the bitmap at on the screen.
pSrcRectThe source rect to draw.
iSurfaceNoWhere to get the image to draw from.

◆ PutBitmap18()

CAVESTORY_MOD_API void PutBitmap18 ( RECT pDstRect,
RECT pSrcRect,
Surface_Ids  iSurfaceNo,
Surface_Ids  iDestSurfaceNo 
)

Draw a surface directly to another surface, with magnified support.

Parameters
pDstRectThe destination rect to draw the bitmap at on the screen.
pSrcRectThe source rect to draw.
iSurfaceNoWhere to get the image to draw from.
iDestSurfaceNoThe surface we're going to draw on.

◆ PutBitmap3()

CAVESTORY_MOD_API void PutBitmap3 ( RECT rcView,
int  x,
int  y,
RECT rect,
Surface_Ids  surf_no 
)

Draw bitmap to the screen with transparency.

Parameters
rcViewThe clip rect to use.
xThe X position.
yThe Y position.
rectThe source rect to draw.
surf_noWhere to get the image to draw from.

◆ PutBitmap4()

CAVESTORY_MOD_API void PutBitmap4 ( RECT rcView,
int  x,
int  y,
RECT rect,
Surface_Ids  surf_no 
)

Draw bitmap to the screen.

Parameters
rcViewThe clip rect to use.
xThe X position.
yThe Y position.
rectThe source rect to draw.
surf_noWhere to get the image to draw from.

◆ PutBitmap5()

CAVESTORY_MOD_API void PutBitmap5 ( RECT rcView,
int  x,
int  y,
RECT rect,
Surface_Ids  surf_no,
int  scalar 
)

Draw bitmap to the screen.

Parameters
rcViewThe clip rect to use.
xThe X position.
yThe Y position.
rectThe source rect to draw.
surf_noWhere to get the image to draw from.
scalarHow much to scale the image.

◆ PutBitmap6()

CAVESTORY_MOD_API void PutBitmap6 ( RECT rcView,
int  x,
int  y,
RECT rect,
Surface_Ids  surf_no,
int  scalar 
)

Draw bitmap to the screen.

Parameters
rcViewThe clip rect to use.
xThe X position.
yThe Y position.
rectThe source rect to draw.
surf_noWhere to get the image to draw from.
scalarHow much to scale the image.

◆ PutBitmap7()

CAVESTORY_MOD_API void PutBitmap7 ( RECT rcView,
int  x,
int  y,
RECT rect,
Surface_Ids  surf_no 
)

Draw bitmap to the screen.

Parameters
rcViewThe clip rect to use.
xThe X position.
yThe Y position.
rectThe source rect to draw.
surf_noWhere to get the image to draw from.

◆ PutBitmap8()

CAVESTORY_MOD_API void PutBitmap8 ( RECT rcView,
int  x,
int  y,
RECT rect,
Surface_Ids  surf_no,
int  r,
int  g,
int  b 
)

Draw bitmap to the screen.

Parameters
rcViewThe clip rect to use.
xThe X position.
yThe Y position.
rectThe source rect to draw.
surf_noWhere to get the image to draw from.
rThe red modulation color
gThe green modulation color
bThe blue modulation color

◆ PutBitmap9()

CAVESTORY_MOD_API void PutBitmap9 ( RECT rcView,
int  x,
int  y,
RECT rect,
Surface_Ids  surf_no,
int  alpha 
)

Draw bitmap to the screen.

Parameters
rcViewThe clip rect to use.
xThe X position.
yThe Y position.
rectThe source rect to draw.
surf_noWhere to get the image to draw from.
alphaThe transparency amount.

◆ PutNumber3()

CAVESTORY_MOD_API void PutNumber3 ( int  x,
int  y,
int  value 
)

Draw a number to the screen.

Parameters
xThe X position.
yThe Y position.
valueThe number to draw.

◆ PutNumber4()

CAVESTORY_MOD_API void PutNumber4 ( int  x,
int  y,
int  value,
BOOL  bZero 
)

Draw a number to the screen.

Parameters
xThe X position.
yThe Y position.
valueThe number to draw.
bZeroIf this should draw a zero.

◆ PutSpecificNpChar()

CAVESTORY_MOD_API void PutSpecificNpChar ( NPCHAR npc,
int  fx,
int  fy,
bool  bIgnorePutFunc = false,
int *  iDrawX = NULL,
int *  iDrawY = NULL 
)

Draw an NPC to the screen.

Parameters
npcThe NPC to draw.
fxThe camera X position.
fyThe camera Y position.
bIgnorePutFuncWhether to ignore the put function this NPC may or may not have.
iDrawXA pointer to an integer to hold the position that the entity was drawn at (top left corner).
iDrawYA pointer to an integer to hold the position that the entity was drawn at (top left corner).