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

Protected Member Functions

void Header (LayoutHolder parent, string function_name)
 
void SetName (string name)
 
void SetItemPreview (EntityAI entity_ai)
 
void DraggingOverHeader (Widget w, int x, int y, Widget receiver)
 
void OnDropReceivedFromHeader (Widget w, int x, int y, Widget receiver)
 
override void SetActive (bool active)
 
void ShowCollapseButton (bool state)
 

Protected Attributes

int m_DefaultColor
 
int m_DefaultFontSize
 
EntityAI m_Entity
 
Widget m_CollapseButton
 
Widget m_UpArrowButton
 
Widget m_DownArrowButton
 
TextWidget m_HeaderText
 

Additional Inherited Members

- Private Member Functions inherited from LayoutHolder
void OnDropReceivedFromHeader (Widget w, int x, int y, Widget receiver)
 
void DraggingOver (Widget w, int x, int y, Widget receiver)
 
void DraggingOverHeader (Widget w, int x, int y, Widget receiver)
 
void UpdateSpacer ()
 
Header GetHeader ()
 
void SetHeader (Header header)
 
void CheckHeaderDragability ()
 
void Container (LayoutHolder parent)
 
Container GetFocusedContainer ()
 
Container GetContainer (int index)
 
void SetFocusedContainer (Container cont)
 
SlotsIcon GetFocusedSlotsIcon ()
 
int GetActiveIndex ()
 
void SetActiveIndex (int index)
 
ScrollWidget GetScrollWidget ()
 
void UpdateRadialIcon ()
 
void SetSlotIcon (SlotsIcon icon)
 
void SetDefaultFocus (bool while_micromanagment_mode=false)
 
void SetLastFocus ()
 
void Unfocus ()
 
void MoveGridCursor (int direction)
 
void ScrollToActiveContainer ()
 
void CheckScrollbarVisibility ()
 
void Open ()
 
void Close ()
 
bool IsOpened ()
 
void SetOpenForSlotIcon (bool open, SlotsIcon icon=null)
 
void Toggle ()
 
float GetFocusedContainerHeight (bool contents=false)
 
float GetFocusedContainerYPos (bool contents=false)
 
float GetFocusedContainerYScreenPos (bool contents=false)
 
int Count ()
 
bool SelectItem ()
 
bool Select ()
 
bool OnSelectButton ()
 
bool Combine ()
 
bool TransferItemToVicinity ()
 
bool TransferItem ()
 
bool InspectItem ()
 
bool SplitItem ()
 
bool EquipItem ()
 
bool CanOpenCloseContainer ()
 
bool CanOpenCloseContainerEx (EntityAI focusedEntity)
 
bool CanSplit ()
 
bool CanSplitEx (EntityAI focusedEntity)
 
bool CanDrop ()
 
bool CanDropEx (EntityAI focusedEntity)
 
bool CanSwapOrTakeToHands ()
 
bool CanSwapOrTakeToHandsEx (EntityAI focusedEntity)
 
bool CanEquip ()
 
bool CanEquipEx (EntityAI focusedEntity)
 
bool CanTakeToInventory ()
 
bool CanTakeToInventoryEx (EntityAI focusedEntity)
 
bool CanCombine ()
 
bool CanCombineEx (EntityAI focusedEntity)
 
bool CanCombineAmmo ()
 
bool CanAddToQuickbarEx (EntityAI focusedEntity)
 
bool AddItemToQuickbarRadial (EntityAI itemToAssign)
 
bool IsEmpty ()
 
bool IsItemActive ()
 
bool IsItemWithQuantityActive ()
 
EntityAI GetFocusedItem ()
 
EntityAI GetFocusedContainerEntity ()
 
int GetColumnCount ()
 
void SetColumnCount (int count)
 
int GetFocusedColumn ()
 
void SetFocusedColumn (int column)
 
override void UpdateInterval ()
 
override void SetLastActive ()
 
override void SetFirstActive ()
 
override void SetActive (bool active)
 
void UnfocusAll ()
 
void UnfocusGrid ()
 
bool IsLastIndex ()
 
bool IsFirstIndex ()
 
bool IsFirstContainerFocused ()
 
bool IsLastContainerFocused ()
 
void ResetFocusedContainer ()
 
void SetNextActive ()
 
void SetPreviousActive (bool force=false)
 
void SetNextRightActive ()
 
void SetNextLeftActive ()
 
void SetSameLevelNextActive ()
 
void SetSameLevelPreviousActive ()
 
void RecomputeOpenedContainers ()
 
override void SetLayoutName ()
 
void Insert (LayoutHolder container, int pos=-1, bool immedUpdate=true)
 
void Remove (LayoutHolder container)
 
LayoutHolder Get (int x)
 
override void Refresh ()
 
void UpdateBodySpacers ()
 
void HideContent (bool force_hide=false)
 
void ShowContent (bool force_show=false)
 
void SetForceShow (bool value)
 
override void UpdateSelectionIcons ()
 
void ExpandCollapseContainer ()
 
- Private Attributes inherited from LayoutHolder
ref array< ref LayoutHolderm_Body
 
ref array< LayoutHolderm_OpenedContainers
 
int m_ActiveIndex = 0
 
bool m_LastIndex
 
bool m_Closed
 
Container m_FocusedContainer
 
float m_PrevAlpha
 
const int ITEMS_IN_ROW = 8
 
int m_ColumnCount
 
int m_FocusedColumn = 0
 
bool m_ForcedHide
 
bool m_ForcedShow
 
SlotsIcon m_SlotIcon
 
EntityAI m_Entity
 
const int SORT_ATTACHMENTS_OWN = 1
 
const int SORT_CARGO_OWN = 2
 
const int SORT_ATTACHMENTS_NEXT_OFFSET = 2
 
const int SORT_CARGO_NEXT_OFFSET = 3
 

Detailed Description

Definition at line 1 of file Header.c.

Constructor & Destructor Documentation

◆ Header()

void Header::Header ( LayoutHolder parent,
string function_name )
inlineprotected

Definition at line 13 of file Header.c.

14 {
15 m_CollapseButton = GetMainWidget().FindAnyWidget("collapse_button");
16 m_UpArrowButton = GetMainWidget().FindAnyWidget("opened");
17 m_DownArrowButton = GetMainWidget().FindAnyWidget("closed");
18
19#ifdef PLATFORM_CONSOLE
20 m_CollapseButton.Show(false);
21#else
23 WidgetEventHandler.GetInstance().RegisterOnDropReceived(m_CollapseButton, m_Parent, "OnDropReceivedFromHeader");
24#endif
25 WidgetEventHandler.GetInstance().RegisterOnDropReceived(GetMainWidget(), m_Parent, "OnDropReceivedFromHeader");
26 WidgetEventHandler.GetInstance().RegisterOnDraggingOver(GetMainWidget(), this, "DraggingOverHeader");
27
28 m_HeaderText = TextWidget.Cast(GetMainWidget().FindAnyWidget("TextWidget0"));
29
30 m_DefaultColor = GetRootWidget().GetColor();
31 }
Widget m_Parent
Definition SizeToChild.c:86
Widget m_DownArrowButton
Definition Header.c:10
int m_DefaultColor
Definition Header.c:3
Widget m_CollapseButton
Definition Header.c:8
Widget m_UpArrowButton
Definition Header.c:9
TextWidget m_HeaderText
Definition Header.c:11
static WidgetEventHandler GetInstance()
proto native Widget FindAnyWidget(string pathname)

References FindAnyWidget(), WidgetEventHandler::GetInstance(), m_CollapseButton, m_DefaultColor, m_DownArrowButton, m_HeaderText, m_Parent, and m_UpArrowButton.

Member Function Documentation

◆ DraggingOverHeader()

void Header::DraggingOverHeader ( Widget w,
int x,
int y,
Widget receiver )
inlineprotected

Definition at line 49 of file Header.c.

50 {
51 if (w == null)
52 return;
53
55 parent_container.DraggingOverHeader(w, x, y, receiver);
56 }
Icon x
Icon y

References m_Parent, x, and y.

◆ OnDropReceivedFromHeader()

void Header::OnDropReceivedFromHeader ( Widget w,
int x,
int y,
Widget receiver )
inlineprotected

Definition at line 58 of file Header.c.

59 {
61 parent_container.OnDropReceivedFromHeader(w, x, y, receiver);
62 }

References m_Parent, x, and y.

◆ SetActive()

override void Header::SetActive ( bool active)
inlineprotected

Definition at line 64 of file Header.c.

65 {
66 super.SetActive(active);
67
68 if (active)
69 GetMainWidget().SetColor(ARGBF(1, 1, 0, 0));
70 else
71 GetMainWidget().SetColor(m_DefaultColor);
72 }
int ARGBF(float fa, float fr, float fg, float fb)
Converts <0.0, 1.0> ARGB into color.
Definition proto.c:332

References ARGBF(), and m_DefaultColor.

◆ SetItemPreview()

void Header::SetItemPreview ( EntityAI entity_ai)
inlineprotected

Definition at line 39 of file Header.c.

40 {
41#ifndef PLATFORM_CONSOLE
43 ItemPreviewWidget item_preview = ItemPreviewWidget.Cast(GetMainWidget().FindAnyWidget("Render"));
44 item_preview.SetItem(entity_ai);
45 item_preview.SetView(entity_ai.GetViewIndex());
46#endif
47 }
EntityAI m_Entity
Definition Header.c:6

References FindAnyWidget(), and m_Entity.

◆ SetName()

void Header::SetName ( string name)
inlineprotected

Definition at line 33 of file Header.c.

34 {
35 name.ToUpper();
36 m_HeaderText.SetText(name);
37 }
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo

References m_HeaderText, and name.

◆ ShowCollapseButton()

void Header::ShowCollapseButton ( bool state)
inlineprotected

Definition at line 74 of file Header.c.

75 {
77 }

References m_CollapseButton.

Member Data Documentation

◆ m_CollapseButton

Widget Header::m_CollapseButton
protected

◆ m_DefaultColor

int Header::m_DefaultColor
protected

◆ m_DefaultFontSize

int Header::m_DefaultFontSize
protected

◆ m_DownArrowButton

Widget Header::m_DownArrowButton
protected

Definition at line 10 of file Header.c.

Referenced by Header(), and CollapsibleHeader::SetArrowButtonOpened().

◆ m_Entity

◆ m_HeaderText

TextWidget Header::m_HeaderText
protected

Definition at line 11 of file Header.c.

Referenced by Header(), ClosableHeader::SetName(), and SetName().

◆ m_UpArrowButton

Widget Header::m_UpArrowButton
protected

Definition at line 9 of file Header.c.

Referenced by Header(), and CollapsibleHeader::SetArrowButtonOpened().


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