Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_ListEntryHelper.c
Go to the documentation of this file.
1
class
SCR_ListEntryHelper
2
{
3
// Modular button effect tags
4
static
const
string
EFFECT_ICON_COLOR =
"IconColor"
;
5
static
const
string
EFFECT_BACKGROUND_COLOR =
"BackgroundColor"
;
6
static
const
string
EFFECT_NAME_COLOR =
"NameColor"
;
7
static
const
string
EFFECT_WRAPPER_COLOR =
"WrapperColor"
;
8
static
const
string
EFFECT_MESSAGE_COLOR =
"MessageColor"
;
9
10
//------------------------------------------------------------------------------------------------
11
static
void
UpdateMouseButtonColor(SCR_ModularButtonComponent button,
bool
inErrorState,
bool
entryFocused)
12
{
13
if
(!button)
14
return
;
15
16
SCR_ButtonEffectColor
effect =
SCR_ButtonEffectColor
.Cast(button.FindEffect(EFFECT_ICON_COLOR));
17
if
(!effect)
18
return
;
19
20
SCR_ButtonEffectColor
effectBackground =
SCR_ButtonEffectColor
.Cast(button.FindEffect(EFFECT_BACKGROUND_COLOR));
21
if
(!effectBackground)
22
return
;
23
24
Color
color =
UIColors
.CopyColor(
UIColors
.IDLE_DISABLED);
25
Color
highlightedColor =
UIColors
.CopyColor(
UIColors
.HIGHLIGHTED);
26
27
if
(inErrorState)
28
{
29
color =
UIColors
.CopyColor(
UIColors
.WARNING_DISABLED);
30
highlightedColor =
UIColors
.CopyColor(
UIColors
.WARNING);
31
}
32
else
if
(entryFocused)
33
{
34
color =
UIColors
.CopyColor(
UIColors
.NEUTRAL_ACTIVE_STANDBY);
35
}
36
37
effect.
m_cDefault
= color;
38
effect.
m_cToggledOff
= color;
39
effect.
m_cHovered
= highlightedColor;
40
effect.
m_cActivatedHovered
= highlightedColor;
41
effect.
m_cFocusGained
= highlightedColor;
42
43
effectBackground.
m_cHovered
= highlightedColor;
44
effectBackground.
m_cActivatedHovered
= highlightedColor;
45
effectBackground.
m_cFocusGained
= highlightedColor;
46
47
button.InvokeAllEnabledEffects(
false
);
48
}
49
}
Color
Definition
Color.c:13
SCR_ButtonEffectColor
Effect which colorizes a widget with given name.
Definition
SCR_ButtonEffectColor.c:4
SCR_ButtonEffectColor::m_cToggledOff
ref Color m_cToggledOff
Definition
SCR_ButtonEffectColor.c:41
SCR_ButtonEffectColor::m_cFocusGained
ref Color m_cFocusGained
Definition
SCR_ButtonEffectColor.c:32
SCR_ButtonEffectColor::m_cHovered
ref Color m_cHovered
Definition
SCR_ButtonEffectColor.c:14
SCR_ButtonEffectColor::m_cActivatedHovered
ref Color m_cActivatedHovered
Definition
SCR_ButtonEffectColor.c:20
SCR_ButtonEffectColor::m_cDefault
ref Color m_cDefault
Definition
SCR_ButtonEffectColor.c:11
SCR_ListEntryHelper
Definition
SCR_ListEntryHelper.c:2
UIColors
Definition
Constants.c:17
scripts
Game
UI
Menu
ContentBrowser
Common
SCR_ListEntryHelper.c
Generated by
1.17.0