Show a dropdown box.
More...
#include <CSMAPI_types.h>
◆ addItem()
void DropdownBoxInfo::addItem |
( |
const char * |
text | ) |
|
Add an item to the list.
- Parameters
-
text | The text of the item. |
◆ calculate()
virtual void DropdownBoxInfo::calculate |
( |
| ) |
|
|
virtual |
Re-calculate this element's data.
- Warning
- You should ALWAYS call this at least once BEFORE you call render()!
Implements GuiBase.
◆ getClassName()
virtual const char* DropdownBoxInfo::getClassName |
( |
| ) |
|
|
inlinevirtual |
Get this class' name.
- Returns
- Should return the name of this class.
Reimplemented from GuiBase.
◆ getCount()
int DropdownBoxInfo::getCount |
( |
| ) |
|
Get number of selectable options.
- Returns
- Returns number of selectable options.
◆ GetDropdownBoxHeight()
static int DropdownBoxInfo::GetDropdownBoxHeight |
( |
FontObject * |
pFont = NULL , |
|
|
int |
iTextMargin = -1 |
|
) |
| |
|
static |
Get the height of a normal dropdown box.
- Parameters
-
pFont | The font to use in the calculation. Leave as 'NULL' to use BaseModeInstance::GetDefaultFont(). |
iTextMargin | The margin for the text. Leave as '-1' to use default values. |
- Returns
- Returns the height of the hypothetical dropdown box.
◆ getFont()
virtual FontObject* DropdownBoxInfo::getFont |
( |
| ) |
|
|
inlinevirtual |
Get the font for this GUI element.
- Returns
- Returns the font object for this element.
Reimplemented from GuiBase.
◆ getHoverableCount()
virtual int DropdownBoxInfo::getHoverableCount |
( |
| ) |
|
|
inlinevirtual |
Get the number of elements that can be hovered over in this element.
- Returns
- Returns the amount of elements that can be hovered over in this element.
Reimplemented from GuiBase.
◆ getIsOpen()
virtual bool DropdownBoxInfo::getIsOpen |
( |
| ) |
|
|
virtual |
Get whether this dropdown box is opened or not.
- Returns
- Returns true if it's open, false otherwise.
◆ getItemText()
const char* DropdownBoxInfo::getItemText |
( |
int |
index | ) |
|
Get item text by index.
- Parameters
-
index | The index of the item |
- Returns
- Returns the item text for the item at the index. Returns NULL if not valid.
◆ getScroll()
Get the scroll object.
- Returns
- Returns the scroll object.
◆ getSelectableCount()
virtual int DropdownBoxInfo::getSelectableCount |
( |
| ) |
|
|
inlinevirtual |
Get the selectable number of elements in this element.
- Returns
- Returns the amount of selectable elements in this element.
Reimplemented from GuiBase.
◆ importantRender()
virtual void DropdownBoxInfo::importantRender |
( |
| ) |
|
|
virtual |
Render the important bits of this element.
- Note
- This function is used to draw things that should be at the front of the screen, so make sure to call it AFTER rendering everything else.
Reimplemented from GuiBase.
◆ isHoverable()
virtual bool DropdownBoxInfo::isHoverable |
( |
| ) |
|
|
virtual |
Check hoverability status.
- Returns
- Returns true if this element can be hovered over.
Implements GuiBase.
◆ isHovered()
virtual bool DropdownBoxInfo::isHovered |
( |
| ) |
|
|
virtual |
Check hover status.
- Returns
- Returns true if this element is being hovered over.
Implements GuiBase.
◆ isSelected()
virtual bool DropdownBoxInfo::isSelected |
( |
| ) |
|
|
virtual |
Check selection status.
- Returns
- Returns true if this element is selected.
Implements GuiBase.
◆ process()
virtual int DropdownBoxInfo::process |
( |
GUI_POINT |
mouse | ) |
|
|
virtual |
◆ processKeys()
virtual int DropdownBoxInfo::processKeys |
( |
| ) |
|
|
virtual |
◆ setFont()
virtual void DropdownBoxInfo::setFont |
( |
FontObject * |
pFont | ) |
|
|
virtual |
Set this element's font.
- Parameters
-
Reimplemented from GuiBase.
◆ setHovered()
virtual void DropdownBoxInfo::setHovered |
( |
int |
value | ) |
|
|
virtual |
Set this GUI element as hovered over or not.
- Parameters
-
Implements GuiBase.
◆ setIsOpen()
virtual void DropdownBoxInfo::setIsOpen |
( |
bool |
bIsOpen | ) |
|
|
virtual |
Set whether this dropdown box is open or not.
- Parameters
-
◆ setSelected()
virtual void DropdownBoxInfo::setSelected |
( |
int |
value | ) |
|
|
virtual |
Set this GUI element as selected or not.
- Parameters
-
value | The selection value. |
Implements GuiBase.
The documentation for this class was generated from the following file: