Theme_Control_GetForegroundColorIndex
- Last UpdatedJul 18, 2023
- 1 minute read
Returns the control highlight foreground color index used for icons and text.
Syntax
Theme_Control_GetForegroundColorIndex(INT nState)
nState
Indicates which state the UI element is in such that correct shade of the color is returned. This can be one of the following values:
|
CTRL_ITEM_STATE_Normal |
0 |
Normal state - no mouse over |
|
CTRL_ITEM_STATE_NormalHover |
2 |
Mouse is hovering over control |
|
CTRL_ITEM_STATE_NormalPressed |
3 |
Mouse button pressed on control |
|
CTRL_ITEM_STATE_Active |
4 |
Item is in selected state |
|
CTRL_ITEM_STATE_ActiveHover |
5 |
Item is in selected and mouse is hovering |
|
CTRL_ITEM_STATE_ActivePressed |
6 |
Item is selected and mouse button is down |
|
CTRL_ITEM_STATE_Disabled |
1 |
Item is disabled |
|
CTRL_ITEM_STATE_ActiveDisabled |
7 |
Item is in selected AND disabled state |
Typically, this state will be returned by a function such as "Button_GetState".
Return Value
Returns an index into the color array configured on the graphics object that called this function.
Example
Theme_Control_GetForegroundColorIndex(Button_GetState(DspGetAnCur()))
Related Functions
Theme_Control_GetColorIndex, Theme_Header_GetBackgroundColorIndex, Theme_Header_GetColorIndex,
Theme_Header_GetMidColorIndex, Theme_SetTheme, Theme_ToggleButton_GetForegroundColorIndex