|
Cavestory Mod API
|
Custom draw GUI element. More...
#include <CSMAPI_types.h>
Public Member Functions | |
| DrawBitmapInfo () | |
| Default constructor. | |
| ~DrawBitmapInfo () | |
| Default deconstructor. | |
| void | Cleanup () |
| Cleanup this DrawBitmapInfo object. | |
| bool | LoadImage (const char *pImage) |
| Load an image using a file path. More... | |
| bool | LoadImage (Surface_Ids eSurfId) |
| Load an image using a surface ID. More... | |
| void | SetImageSourceRect (GUI_RECT *pSrcRect) |
| Set the image's source rect. More... | |
| void | SetColorMod (GUI_COLOR *pColor) |
| Set the modulation color. More... | |
| GUI_RECT | GetImageSourceRect () |
| Get the image's source rect. More... | |
| Surface_Ids | GetSurfaceID () |
| Get the image's surface ID. More... | |
| GUI_COLOR | GetColorMod () |
| Get the modulation color. More... | |
| virtual const char * | getClassName () |
| Get this class' name. More... | |
| virtual void | setSelected (int value) |
| Set this GUI element as selected or not. More... | |
| virtual void | setHovered (int value) |
| Set this GUI element as hovered over or not. More... | |
| virtual bool | isSelected () |
| Check selection status. More... | |
| virtual bool | isHovered () |
| Check hover status. More... | |
| virtual bool | isHoverable () |
| Check hoverability status. More... | |
| virtual int | process (GUI_POINT mouse) |
| Process mouse input for this element. More... | |
| virtual void | calculate () |
| Re-calculate this element's data. More... | |
| virtual void | render () |
| Render this element. | |
Public Member Functions inherited from GuiBase | |
| GuiBase () | |
| Default constructor. | |
| virtual | ~GuiBase () |
| Default deconstructor. | |
| virtual int | getSelectableCount () |
| Get the selectable number of elements in this element. More... | |
| virtual int | getHoverableCount () |
| Get the number of elements that can be hovered over in this element. More... | |
| virtual GuiBase * | getHoverable (int index) |
| Get a hoverable sub-element. More... | |
| virtual GuiBase * | getSelectable (int index) |
| Get a selectable sub-element. More... | |
| virtual bool | SelectOnMouseUp () |
| Select on mouse up. More... | |
| virtual void | setFont (FontObject *pFont) |
| Set the font for this GUI element. More... | |
| virtual FontObject * | getFont () |
| Get the font for this GUI element. More... | |
| virtual int | processKeys () |
| Process key input for this element. More... | |
| virtual void | importantRender () |
| Render the important bits of this element. More... | |
| virtual int | getMagnification () |
| GuiBase (const GuiBase &)=delete | |
| GuiBase & | operator= (const GuiBase &)=delete |
| GuiBase (GuiBase &&)=delete | |
| GuiBase & | operator= (GuiBase &&)=delete |
Public Attributes | |
| bool | m_Stretch |
| Stretch the image along with this object's rect. | |
Public Attributes inherited from GuiBase | |
| GuiBase * | pNext |
| GuiBase * | pPrev |
| OnValueChangeCallbackFunc | OnValueChange |
| Called in specific GuiBase children classes to indicate that a value has been changed. | |
| OnValidateChangeCallbackFunc | OnValidateChange |
| Called in specific GuiBase children classes to indicate that a value has been changed. | |
| GUI_RECT | rect |
| The display rect this GUI element will use. | |
| void * | userData |
| Custom user data. | |
| void * | userData2 |
| Custom user data. | |
| unsigned int | customMagnification |
| The magnification to display this element at. | |
| OnHoverChangeCallbackFunc | OnHoverChange |
| Called in specific GuiBase children classes to indicate that the GUI element is being hovered over. | |
| bool | has_special_mouse_processing |
| Has special mouse processing. | |
| GUI_RECT | hotspot_rect |
| The special hotspot rect. | |
| bool | has_special_hotspot_rect |
| Has special hotspot rect; If true, 'process' will be called everytime the mouse is inside of 'hotspot_rect' instead of 'rect'. | |
Protected Attributes | |
| bool | m_IsSurfAllocated |
| If this is 'true', then we need to unload m_SrcSurfID when this object gets deleted. | |
| Surface_Ids | m_SurfID |
| The loaded surface's ID. | |
| GUI_RECT | m_SrcRect |
| The source rect that we will be using to draw the image with. | |
Additional Inherited Members | |
Public Types inherited from GuiBase | |
| enum | ProcessReturnType { PRT_DIRTY = 0b000001 , PRT_IGNORE_MOUSE = 0b000010 , PRT_IGNORE_KEYS = 0b000100 , PRT_SELECTED = 0b001000 , PRT_DISABLE_MOUSE_ON_MOVE = 0b010000 , PRT_CHANGED = 0b100000 } |
| Return flags for GuiBase::process and GuiBase::processKeys. More... | |
| typedef void(* | OnHoverChangeCallbackFunc) (GuiBase *, int value) |
| Hover callback. | |
| typedef void(* | OnValueChangeCallbackFunc) (GuiBase *, const char *&newValue) |
| Value change callback. | |
| typedef bool(* | OnValidateChangeCallbackFunc) (GuiBase *, const char *oldValue, char *newValue) |
| Validate change callback. | |
Static Public Attributes inherited from GuiBase | |
| static unsigned int | defaultCustomMagnification |
| static GuiBase * | gFirst |
Protected Member Functions inherited from GuiBase | |
| void | Link () |
| Link ourselves to the global GUI element linkage. | |
| void | Unlink () |
| Unlink ourselves from the global GUI element linkage. | |
Custom draw GUI element.
|
virtual |
|
inlinevirtual |
|
inline |
Get the modulation color.
|
inline |
Get the image's source rect.
|
inline |
Get the image's surface ID.
Do NOT free this.
|
virtual |
Check hoverability status.
Implements GuiBase.
|
virtual |
|
virtual |
| bool DrawBitmapInfo::LoadImage | ( | const char * | pImage | ) |
Load an image using a file path.
| pFileName | The file to load. |
| bool DrawBitmapInfo::LoadImage | ( | Surface_Ids | eSurfId | ) |
Load an image using a surface ID.
| eSurfId | The surface ID to use. |
|
virtual |
Process mouse input for this element.
Implements GuiBase.
| void DrawBitmapInfo::SetColorMod | ( | GUI_COLOR * | pColor | ) |
Set the modulation color.
| pColor | The color to modulate the surface by. Pass 'NULL' to not modulate the surface. |
|
virtual |
| void DrawBitmapInfo::SetImageSourceRect | ( | GUI_RECT * | pSrcRect | ) |
Set the image's source rect.
| pSrcRect | The rect of the image to draw. Pass 'NULL' to draw the entire surface. |
|
virtual |