Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
colormanager.c
Go to the documentation of this file.
1
class
ColorManager
2
{
3
private
ref
static
ColorManager
m_Instance
;
4
5
static
int
COLOR_NORMAL_TEXT
=
ARGB
( 255, 255, 255, 255 );
6
static
int
COLOR_NORMAL_PANEL
=
ARGB
( 140, 0, 0, 0 );
7
static
int
COLOR_HIGHLIGHT_TEXT
=
ARGB
( 255, 200, 0, 0 );
8
static
int
COLOR_HIGHLIGHT_PANEL
=
ARGB
( 255, 0, 0, 0 );
9
static
int
COLOR_SELECTED_TEXT
=
ARGB
( 255, 255, 255, 255 );
10
static
int
COLOR_SELECTED_PANEL
=
ARGB
( 255, 200, 0, 0 );
11
static
int
COLOR_DISABLED_TEXT
=
ARGB
( 100, 255, 255, 255 );
12
static
int
COLOR_DISABLED_PANEL
=
ARGB
( 140, 0, 0, 0 );
13
14
static
int
ITEM_BACKGROUND_COLOR
=
ARGB
( 50, 255, 255, 255 );
15
static
int
BASE_COLOR
=
ARGB
( 10, 255, 255, 255 );
16
static
int
RED_COLOR
=
ARGB
( 150, 255, 1, 1 );
17
static
int
GREEN_COLOR
=
ARGB
( 150, 1, 255, 1 );
18
static
int
SWAP_COLOR
=
ARGB
( 150, 135, 206, 250 );
19
static
int
FSWAP_COLOR
=
ARGB
( 150, 35, 106, 150 );
20
static
int
COMBINE_COLOR
=
ARGB
( 150, 255, 165, 0 );
21
22
void
ColorManager
()
23
{
24
m_Instance
=
this
;
25
}
26
27
static
ColorManager
GetInstance
()
28
{
29
return
m_Instance
;
30
}
31
32
void
SetColor
(
Widget
w,
int
color )
33
{
34
if
( w.FindAnyWidget(
"Cursor"
) )
35
{
36
w.FindAnyWidget(
"Cursor"
).SetColor( color );
37
}
38
else
39
{
40
string
name
= w.GetName();
41
name
.Replace(
"PanelWidget"
,
"Cursor"
);
42
Widget
w2 = w.GetParent().FindAnyWidget(
name
);
43
if
( w2 )
44
{
45
w2.SetColor( color );
46
}
47
}
48
}
49
50
//TODO: revise this mess
51
int
GetItemColor
(
ItemBase
item )
52
{
53
int
color = -1;
54
ItemBase
dragged_item =
ItemBase
.Cast(
ItemManager
.
GetInstance
().
GetDraggedItem
() );
55
PlayerBase
player =
PlayerBase
.Cast(
g_Game
.GetPlayer() );
56
57
if
( item == dragged_item )
58
return
color;
59
60
// if item icon is main icon (view, viewgrid )
61
if
( item.GetHierarchyParent() && item.GetHierarchyParent() != player )
62
{
63
color = -1;
64
}
65
66
if
( item )
67
{
68
float
temperature = item.GetTemperature();
69
if
( temperature )
70
{
71
color = ObjectTemperatureState.GetStateData(temperature).m_Color;
72
}
73
}
74
return
color;
75
}
76
}
name
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
ColorManager::GREEN_COLOR
static int GREEN_COLOR
Definition
colormanager.c:17
ColorManager::GetInstance
static ColorManager GetInstance()
Definition
colormanager.c:27
ColorManager::RED_COLOR
static int RED_COLOR
Definition
colormanager.c:16
ColorManager::SWAP_COLOR
static int SWAP_COLOR
Definition
colormanager.c:18
ColorManager::COLOR_DISABLED_PANEL
static int COLOR_DISABLED_PANEL
Definition
colormanager.c:12
ColorManager::COLOR_HIGHLIGHT_PANEL
static int COLOR_HIGHLIGHT_PANEL
Definition
colormanager.c:8
ColorManager::BASE_COLOR
static int BASE_COLOR
Definition
colormanager.c:15
ColorManager::ColorManager
void ColorManager()
Definition
colormanager.c:22
ColorManager::ITEM_BACKGROUND_COLOR
static int ITEM_BACKGROUND_COLOR
Definition
colormanager.c:14
ColorManager::COLOR_HIGHLIGHT_TEXT
static int COLOR_HIGHLIGHT_TEXT
Definition
colormanager.c:7
ColorManager::COMBINE_COLOR
static int COMBINE_COLOR
Definition
colormanager.c:20
ColorManager::COLOR_NORMAL_PANEL
static int COLOR_NORMAL_PANEL
Definition
colormanager.c:6
ColorManager::COLOR_DISABLED_TEXT
static int COLOR_DISABLED_TEXT
Definition
colormanager.c:11
ColorManager::FSWAP_COLOR
static int FSWAP_COLOR
Definition
colormanager.c:19
ColorManager::SetColor
void SetColor(Widget w, int color)
Definition
colormanager.c:32
ColorManager::COLOR_NORMAL_TEXT
static int COLOR_NORMAL_TEXT
Definition
colormanager.c:5
ColorManager::GetItemColor
int GetItemColor(ItemBase item)
Definition
colormanager.c:51
ColorManager::m_Instance
static ref ColorManager m_Instance
Definition
colormanager.c:3
ColorManager::COLOR_SELECTED_TEXT
static int COLOR_SELECTED_TEXT
Definition
colormanager.c:9
ColorManager::COLOR_SELECTED_PANEL
static int COLOR_SELECTED_PANEL
Definition
colormanager.c:10
ItemBase
Definition
inventoryitem.c:742
ItemManager
Definition
itemmanager.c:2
ItemManager::GetInstance
static ItemManager GetInstance()
Definition
itemmanager.c:282
ItemManager::GetDraggedItem
EntityAI GetDraggedItem()
Definition
itemmanager.c:368
PlayerBase
Definition
playerbaseclient.c:2
Widget
Definition
enwidgets.c:190
g_Game
DayZGame g_Game
Definition
dayzgame.c:3942
ARGB
int ARGB(int a, int r, int g, int b)
Definition
proto.c:322
Games
Dayz
scripts
5_mission
gui
inventorynew
colormanager.c
Generated by
1.17.0