DayZ 1.24
Loading...
Searching...
No Matches
ColorManager.c
Go to the documentation of this file.
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
23 {
24 m_Instance = this;
25 }
26
28 {
29 return m_Instance;
30 }
31
33 {
34 if (w.FindAnyWidget("Cursor"))
35 w.FindAnyWidget("Cursor").SetColor(color);
36 else
37 {
38 string name = w.GetName();
39 name.Replace("PanelWidget", "Cursor");
40 Widget w2 = w.GetParent().FindAnyWidget(name);
41 if (w2)
42 w2.SetColor(color);
43 }
44 }
45
47 {
48 int color = -1;
49 ItemBase dragged_item = ItemBase.Cast(ItemManager.GetInstance().GetDraggedItem());
51
52 if (dragged_item)
53 return 0;
54
55 // if item icon is main icon (view, viewgrid )
56 if (item.GetHierarchyParent() && item.GetHierarchyParent() != player)
57 color = -1;
58
59 if (item)
60 {
61 float temperature = item.GetTemperature();
62 if (temperature)
64 }
65 return color;
66 }
67}
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
PlayerBase GetPlayer()
static int COLOR_NORMAL_TEXT
Definition ColorManager.c:5
void SetColor(Widget w, int color)
static int BASE_COLOR
static int COLOR_SELECTED_PANEL
static int COMBINE_COLOR
static int SWAP_COLOR
static int COLOR_SELECTED_TEXT
Definition ColorManager.c:9
static int COLOR_DISABLED_PANEL
static int FSWAP_COLOR
static int COLOR_NORMAL_PANEL
Definition ColorManager.c:6
static ref ColorManager m_Instance
Definition ColorManager.c:3
static int ITEM_BACKGROUND_COLOR
static int GREEN_COLOR
static int COLOR_HIGHLIGHT_TEXT
Definition ColorManager.c:7
void ColorManager()
static int COLOR_DISABLED_TEXT
int GetItemColor(ItemBase item)
static int RED_COLOR
static int COLOR_HIGHLIGHT_PANEL
Definition ColorManager.c:8
static ColorManager GetInstance()
static ItemManager GetInstance()
proto native CGame GetGame()
int GetTemperatureColor(int temperature)
Definition tools.c:929
int ARGB(int a, int r, int g, int b)
Definition proto.c:322