DayZ 1.24
Loading...
Searching...
No Matches
ColorManager Class Reference
Collaboration diagram for ColorManager:
[legend]

Private Member Functions

void ColorManager ()
 
void SetColor (Widget w, int color)
 
int GetItemColor (ItemBase item)
 

Static Private Member Functions

static ColorManager GetInstance ()
 

Static Private Attributes

static ref ColorManager m_Instance
 
static int COLOR_NORMAL_TEXT = ARGB(255, 255, 255, 255)
 
static int COLOR_NORMAL_PANEL = ARGB(140, 0, 0, 0)
 
static int COLOR_HIGHLIGHT_TEXT = ARGB(255, 200, 0, 0)
 
static int COLOR_HIGHLIGHT_PANEL = ARGB(255, 0, 0, 0)
 
static int COLOR_SELECTED_TEXT = ARGB(255, 255, 255, 255)
 
static int COLOR_SELECTED_PANEL = ARGB(255, 200, 0, 0)
 
static int COLOR_DISABLED_TEXT = ARGB(100, 255, 255, 255)
 
static int COLOR_DISABLED_PANEL = ARGB(140, 0, 0, 0)
 
static int ITEM_BACKGROUND_COLOR = ARGB(50, 255, 255, 255)
 
static int BASE_COLOR = ARGB(10, 255, 255, 255)
 
static int RED_COLOR = ARGB(150, 255, 1, 1)
 
static int GREEN_COLOR = ARGB(150, 1, 255, 1)
 
static int SWAP_COLOR = ARGB(150, 135, 206, 250)
 
static int FSWAP_COLOR = ARGB(150, 35, 106, 150)
 
static int COMBINE_COLOR = ARGB(150, 255, 165, 0)
 

Detailed Description

Definition at line 1 of file ColorManager.c.

Constructor & Destructor Documentation

◆ ColorManager()

void ColorManager::ColorManager ( )
inlineprivate

Definition at line 22 of file ColorManager.c.

23 {
24 m_Instance = this;
25 }
static ref ColorManager m_Instance
Definition ColorManager.c:3

References m_Instance.

Member Function Documentation

◆ GetInstance()

◆ GetItemColor()

int ColorManager::GetItemColor ( ItemBase item)
inlineprivate

Definition at line 46 of file ColorManager.c.

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 }
PlayerBase GetPlayer()
static ItemManager GetInstance()
proto native CGame GetGame()
int GetTemperatureColor(int temperature)
Definition tools.c:929

References GetGame(), ItemManager::GetInstance(), GetPlayer(), and GetTemperatureColor().

◆ SetColor()

void ColorManager::SetColor ( Widget w,
int color )
inlineprivate

Definition at line 32 of file ColorManager.c.

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 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo

References name.

Member Data Documentation

◆ BASE_COLOR

◆ COLOR_DISABLED_PANEL

int ColorManager::COLOR_DISABLED_PANEL = ARGB(140, 0, 0, 0)
staticprivate

Definition at line 12 of file ColorManager.c.

◆ COLOR_DISABLED_TEXT

int ColorManager::COLOR_DISABLED_TEXT = ARGB(100, 255, 255, 255)
staticprivate

◆ COLOR_HIGHLIGHT_PANEL

int ColorManager::COLOR_HIGHLIGHT_PANEL = ARGB(255, 0, 0, 0)
staticprivate

Definition at line 8 of file ColorManager.c.

◆ COLOR_HIGHLIGHT_TEXT

int ColorManager::COLOR_HIGHLIGHT_TEXT = ARGB(255, 200, 0, 0)
staticprivate

Definition at line 7 of file ColorManager.c.

◆ COLOR_NORMAL_PANEL

int ColorManager::COLOR_NORMAL_PANEL = ARGB(140, 0, 0, 0)
staticprivate

Definition at line 6 of file ColorManager.c.

◆ COLOR_NORMAL_TEXT

int ColorManager::COLOR_NORMAL_TEXT = ARGB(255, 255, 255, 255)
staticprivate

Definition at line 5 of file ColorManager.c.

Referenced by UIScriptedMenu::ColorNormal(), and UIScriptedMenu::ColorWhite().

◆ COLOR_SELECTED_PANEL

int ColorManager::COLOR_SELECTED_PANEL = ARGB(255, 200, 0, 0)
staticprivate

Definition at line 10 of file ColorManager.c.

◆ COLOR_SELECTED_TEXT

int ColorManager::COLOR_SELECTED_TEXT = ARGB(255, 255, 255, 255)
staticprivate

Definition at line 9 of file ColorManager.c.

◆ COMBINE_COLOR

◆ FSWAP_COLOR

int ColorManager::FSWAP_COLOR = ARGB(150, 35, 106, 150)
staticprivate

Definition at line 19 of file ColorManager.c.

Referenced by Icon::DraggingOverSwap(), and Icon::UpdateFrameColor().

◆ GREEN_COLOR

◆ ITEM_BACKGROUND_COLOR

int ColorManager::ITEM_BACKGROUND_COLOR = ARGB(50, 255, 255, 255)
staticprivate

Definition at line 14 of file ColorManager.c.

◆ m_Instance

ref ColorManager ColorManager::m_Instance
staticprivate

Definition at line 3 of file ColorManager.c.

Referenced by ColorManager(), and GetInstance().

◆ RED_COLOR

◆ SWAP_COLOR


The documentation for this class was generated from the following file: