Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс LeftArea
+ Граф наследования:LeftArea:

Защищенные члены

void LeftArea (LayoutHolder parent)
 
override void UnfocusGrid ()
 
override bool IsActive ()
 
override void SetActive (bool active)
 
override ScrollWidget GetScrollWidget ()
 
override void UpdateSelectionIcons ()
 
float GetCurrentContainerTopY ()
 
float GetCurrentContainerBottomY ()
 
override void SetSameLevelNextActive ()
 
override void SetSameLevelPreviousActive ()
 
override void ExpandCollapseContainer ()
 
void OnLeftPanelDropReceived (Widget w, int x, int y, Widget receiver)
 
override void DraggingOverHeader (Widget w, int x, int y, Widget receiver)
 
override void SetLayoutName ()
 
override EntityAI GetFocusedItem ()
 
VicinityContainer GetVicinityContainer ()
 
override void SetParentWidget ()
 
override void OnShow ()
 
override void Refresh ()
 
override void UpdateInterval ()
 
override bool OnChildRemove (Widget w, Widget child)
 
override bool OnChildAdd (Widget w, Widget child)
 

Защищенные данные

Widget m_UpIcon
 
Widget m_DownIcon
 
Widget m_ContentParent
 
ref VicinityContainer m_VicinityContainer
 
ScrollWidget m_ScrollWidget
 
ref SizeToChild m_ContentResize
 
bool m_ShouldChangeSize = true
 
bool m_IsProcessing = false
 

Дополнительные унаследованные члены

- Закрытые члены унаследованные от Container
void CargoContainer (LayoutHolder parent, bool is_attachment=false)
 
void ~CargoContainer ()
 
int GetCargoIndex ()
 
void AddedToCargoEx (EntityAI item, bool refresh=true)
 
void AddedToCargo (EntityAI item)
 
void RemovedFromCargo (EntityAI item)
 
void MovedInCargo (EntityAI item)
 
void SetLock (EntityAI item)
 
void ReleaseLock (EntityAI item)
 
override void SetLayoutName ()
 
void SetEntity (EntityAI item, int cargo_index=0, bool immedUpdate=true)
 
EntityAI GetEntity ()
 
void UpdateHeaderText ()
 
void InitGridHeight ()
 
void UpdateSize ()
 
float GetIconSize ()
 
float GetSpaceSize ()
 
int GetCargoCapacity ()
 
int GetMaxCargoCapacity ()
 
Icon GetIcon (EntityAI item)
 
Icon GetIcon (int index)
 
Icon GetFocusedIcon ()
 
override float GetFocusedContainerHeight (bool contents=false)
 
override float GetFocusedContainerYPos (bool contents=false)
 
override float GetFocusedContainerYScreenPos (bool contents=false)
 
void UpdateSelection ()
 
void UpdateRowVisibility (int count)
 
override void Refresh ()
 
void RefreshImpl ()
 
override void UpdateInterval ()
 
Icon InitIconEx (Icon icon, EntityAI item, int pos_x, int pos_y, bool refresh=true)
 
Icon InitIcon (Icon icon, EntityAI item, int pos_x, int pos_y)
 
bool HasItem (EntityAI item)
 
override bool TransferItemToVicinity ()
 
override void SetDefaultFocus (bool while_micromanagment_mode=false)
 
override void SetLastFocus ()
 
override void Unfocus ()
 
override void UnfocusAll ()
 
override void SetNextActive ()
 
override void SetPreviousActive (bool force=false)
 
override void SetNextRightActive ()
 
override void SetNextLeftActive ()
 
override EntityAI GetFocusedItem ()
 
override void SetLastActive ()
 
override void SetActive (bool active)
 
override bool IsItemActive ()
 
override bool IsItemWithQuantityActive ()
 
override bool IsEmpty ()
 
int GetRecipeCount (bool recipe_anywhere, ItemBase entity1, ItemBase entity2, PlayerBase player)
 
override bool CanCombineAmmo ()
 
override bool TransferItem ()
 
override bool SplitItem ()
 
override bool EquipItem ()
 
override bool SelectItem ()
 
override bool Select ()
 
override bool Combine ()
 
void ShowFalseCargoHeader (bool show)
 
void SetAlternateFalseTextHeaderWidget (TextWidget w)
 
void ClosableContainer (LayoutHolder parent, int sort=-1)
 
override bool IsDisplayable ()
 
override void UpdateRadialIcon ()
 
void SetOpenState (bool state)
 
override Header GetHeader ()
 
override void Open ()
 
override void Close ()
 
override void SetLayoutName ()
 
override void OnShow ()
 
override LayoutHolder Get (int x)
 
override void Refresh ()
 
void CloseButtonOnMouseButtonDown ()
 
override float GetFocusedContainerHeight (bool contents=false)
 
override float GetFocusedContainerYPos (bool contents=false)
 
override float GetFocusedContainerYScreenPos (bool contents=false)
 
void MoveContainerUp (Widget cont)
 
void MoveContainerDown (Widget cont)
 
override void CheckHeaderDragability ()
 
- Закрытые данные унаследованные от Container
const int ROWS_NUMBER_XBOX = 5
 
CargoBase m_Cargo
 
int m_CargoIndex = -1
 
int m_FocusedItemPosition = -1
 
ref array< ref CargoContainerRowm_Rows
 
ref array< ref Iconm_Icons
 
ref map< EntityAI, ref Param3< ref Icon, int, int > > m_ShowedItemPositions
 
ref map< EntityAI, ref Param3< ref Icon, int, int > > m_ShowedLockPositions
 
float m_IconSize
 
float m_SpaceSize
 
bool m_IsAttachment
 
TextWidget m_FalseHeaderTextWidget
 
TextWidget m_AlternateFalseHeaderTextWidget
 
Widget m_CargoHeader
 
Widget m_CargoContainer
 
Widget m_ItemsContainer
 
ref SizeToChild m_Resizer1
 
ref SizeToChild m_Resizer2
 
ref Timer m_ResizeTimer
 
ref ClosableHeader m_ClosableHeader
 
bool m_LockCargo
 

Подробное описание

Конструктор(ы)

◆ LeftArea()

void LeftArea ( LayoutHolder parent)
inlineprotected
13 {
14 m_MainWidget.Show(true, false);
15
16 m_ContentParent = m_MainWidget.FindAnyWidget("ContentParent");
18
19 m_ScrollWidget = ScrollWidget.Cast(m_MainWidget.FindAnyWidget("Scroller"));
20 m_MainWidget = m_MainWidget.FindAnyWidget("Content");
21
22 m_UpIcon = m_RootWidget.FindAnyWidget("Up");
23 m_DownIcon = m_RootWidget.FindAnyWidget("Down");
24
25 m_VicinityContainer = new VicinityContainer(this, false);
26 m_Body.Insert(m_VicinityContainer);
27 m_ActiveIndex = 0;
28
29 WidgetEventHandler.GetInstance().RegisterOnChildAdd(m_MainWidget, this, "OnChildAdd");
30 WidgetEventHandler.GetInstance().RegisterOnChildRemove(m_MainWidget, this, "OnChildRemove");
31 RecomputeOpenedContainers();
32 }
ref Widget m_RootWidget[MAX_SIMULTANIOUS_PLAYERS]
Definition PluginRemotePlayerDebugClient.c:14
ref SizeToChild m_ContentResize
Definition LeftArea.c:8
Widget m_ContentParent
Definition LeftArea.c:5
Widget m_UpIcon
Definition LeftArea.c:3
ScrollWidget m_ScrollWidget
Definition LeftArea.c:7
ref VicinityContainer m_VicinityContainer
Definition LeftArea.c:6
Widget m_DownIcon
Definition LeftArea.c:4
Definition EntityAI.c:95
Definition VicinityContainer.c:2
Definition WidgetEventHandler.c:2
static WidgetEventHandler GetInstance()
Definition WidgetEventHandler.c:22

Перекрестные ссылки WidgetEventHandler::GetInstance(), m_ContentParent, m_ContentResize, m_DownIcon, m_RootWidget, m_ScrollWidget, m_UpIcon и m_VicinityContainer.

Методы

◆ DraggingOverHeader()

override void DraggingOverHeader ( Widget w,
int x,
int y,
Widget receiver )
inlineprotected
149 {
150 m_VicinityContainer.DraggingOverHeader( w, x, y, receiver );
151 }
Icon x
Icon y

Перекрестные ссылки m_VicinityContainer, x и y.

◆ ExpandCollapseContainer()

override void ExpandCollapseContainer ( )
inlineprotected
133 {
134 Container c = GetFocusedContainer();
135 if (c)
136 {
137 c.ExpandCollapseContainer();
138 }
139
140 Refresh();
141 }
Definition CargoContainer.c:3
override void Refresh()
Definition LeftArea.c:202

Перекрестные ссылки Refresh().

◆ GetCurrentContainerBottomY()

float GetCurrentContainerBottomY ( )
inlineprotected
108 {
110 m_MainWidget.GetScreenPos( x, y );
111
112 if ( m_OpenedContainers.IsValidIndex( m_ActiveIndex ) )
113 {
114 cont_screen_pos = Container.Cast( m_OpenedContainers.Get( m_ActiveIndex ) ).GetFocusedContainerYScreenPos();
115 cont_screen_height = Container.Cast( m_OpenedContainers.Get( m_ActiveIndex ) ).GetFocusedContainerHeight();
116 }
117
119 }
override float GetFocusedContainerYScreenPos(bool contents=false)
Definition CargoContainer.c:454
override float GetFocusedContainerHeight(bool contents=false)
Definition CargoContainer.c:434

Перекрестные ссылки Container::GetFocusedContainerHeight(), Container::GetFocusedContainerYScreenPos(), x и y.

Используется в UpdateSelectionIcons().

◆ GetCurrentContainerTopY()

float GetCurrentContainerTopY ( )
inlineprotected
98 {
99 float x, y, cont_screen_pos;
100 m_MainWidget.GetScreenPos( x, y );
101 if ( m_OpenedContainers.IsValidIndex( m_ActiveIndex ) )
102 cont_screen_pos = Container.Cast( m_OpenedContainers.Get( m_ActiveIndex ) ).GetFocusedContainerYScreenPos();
103
104 return cont_screen_pos - y;
105 }

Перекрестные ссылки Container::GetFocusedContainerYScreenPos(), x и y.

Используется в UpdateSelectionIcons().

◆ GetFocusedItem()

override EntityAI GetFocusedItem ( )
inlineprotected
181 {
182 EntityAI item = GetFocusedContainer().GetFocusedItem();
183 return item;
184 }
Definition Building.c:6

◆ GetScrollWidget()

override ScrollWidget GetScrollWidget ( )
inlineprotected
62 {
63 return m_ScrollWidget;
64 }

Перекрестные ссылки m_ScrollWidget.

◆ GetVicinityContainer()

VicinityContainer GetVicinityContainer ( )
inlineprotected
187 {
188 return m_VicinityContainer;
189 }

Перекрестные ссылки m_VicinityContainer.

◆ IsActive()

override bool IsActive ( )
inlineprotected
45 {
46 if( m_OpenedContainers.Count() <= m_ActiveIndex )
47 {
48 m_ActiveIndex = 0;
49 }
50 Container active_container = Container.Cast( m_OpenedContainers.Get( m_ActiveIndex ) );
51 return active_container.IsActive( );
52 }

◆ OnChildAdd()

override bool OnChildAdd ( Widget w,
Widget child )
inlineprotected
247 {
248 if (!m_IsProcessing)
249 Refresh();
250 return true;
251 }
bool m_IsProcessing
Definition LeftArea.c:10

Перекрестные ссылки m_IsProcessing и Refresh().

◆ OnChildRemove()

override bool OnChildRemove ( Widget w,
Widget child )
inlineprotected
240 {
241 if (!m_IsProcessing)
242 Refresh();
243 return true;
244 }

Перекрестные ссылки m_IsProcessing и Refresh().

◆ OnLeftPanelDropReceived()

void OnLeftPanelDropReceived ( Widget w,
int x,
int y,
Widget receiver )
inlineprotected
144 {
145 m_VicinityContainer.OnLeftPanelDropReceived( w, x, y, receiver );
146 }

Перекрестные ссылки m_VicinityContainer, x и y.

◆ OnShow()

override void OnShow ( )
inlineprotected
197 {
198 super.OnShow();
199 Refresh();
200 }

Перекрестные ссылки Refresh().

◆ Refresh()

override void Refresh ( )
inlineprotected
203 {
204 super.Refresh();
205
206 m_MainWidget.Update();
207 m_RootWidget.Update();
208 m_ScrollWidget.Update();
209
211 m_ShouldChangeSize = true;
212 }
override void UpdateSelectionIcons()
Definition LeftArea.c:66
bool m_ShouldChangeSize
Definition LeftArea.c:9

Перекрестные ссылки m_RootWidget, m_ScrollWidget, m_ShouldChangeSize и UpdateSelectionIcons().

Используется в ExpandCollapseContainer(), OnChildAdd(), OnChildRemove(), OnShow(), SetSameLevelNextActive() и SetSameLevelPreviousActive().

◆ SetActive()

override void SetActive ( bool active)
inlineprotected
55 {
56 super.SetActive( active );
57
59 }

Перекрестные ссылки UpdateSelectionIcons().

◆ SetLayoutName()

override void SetLayoutName ( )
inlineprotected
154 {
155 #ifdef PLATFORM_CONSOLE
156 m_LayoutName = WidgetLayoutName.LeftAreaXbox;
157 #else
158 switch ( InventoryMenu.GetWidthType() )
159 {
160 case ScreenWidthType.NARROW:
161 {
162 m_LayoutName = WidgetLayoutName.LeftAreaNarrow;
163 break;
164 }
165 case ScreenWidthType.MEDIUM:
166 {
167 m_LayoutName = WidgetLayoutName.LeftAreaMedium;
168 break;
169 }
170 case ScreenWidthType.WIDE:
171 {
172 m_LayoutName = WidgetLayoutName.LeftAreaWide;
173 break;
174 }
175 }
176 #endif
177
178 }
ScreenWidthType
Definition InventoryMenu.c:2
void InventoryMenu()
Definition InventoryMenu.c:20
Definition WidgetLayoutName.c:2
const string LeftAreaMedium
Definition WidgetLayoutName.c:34
const string LeftAreaWide
Definition WidgetLayoutName.c:35
const string LeftAreaXbox
Definition WidgetLayoutName.c:36
const string LeftAreaNarrow
Definition WidgetLayoutName.c:33

Перекрестные ссылки InventoryMenu(), WidgetLayoutName::LeftAreaMedium, WidgetLayoutName::LeftAreaNarrow, WidgetLayoutName::LeftAreaWide и WidgetLayoutName::LeftAreaXbox.

◆ SetParentWidget()

override void SetParentWidget ( )
inlineprotected
192 {
193 m_ParentWidget = m_Parent.GetMainWidget().FindAnyWidget( "LeftPanel" );
194 }
Widget m_Parent
Definition SizeToChild.c:92
Widget m_ParentWidget
Definition UiHintPanel.c:318

Перекрестные ссылки m_Parent и m_ParentWidget.

◆ SetSameLevelNextActive()

override void SetSameLevelNextActive ( )
inlineprotected
122 {
123 m_VicinityContainer.SetSameLevelNextActive();
124 Refresh();
125 }

Перекрестные ссылки m_VicinityContainer и Refresh().

◆ SetSameLevelPreviousActive()

override void SetSameLevelPreviousActive ( )
inlineprotected
127 {
128 m_VicinityContainer.SetSameLevelPreviousActive();
129 Refresh();
130 }

Перекрестные ссылки m_VicinityContainer и Refresh().

◆ UnfocusGrid()

override void UnfocusGrid ( )
inlineprotected
35 {
37 for ( int i = 0; i < m_OpenedContainers.Count(); i++ )
38 {
39 active_container = Container.Cast( m_OpenedContainers.Get( i ) );
40 active_container.UnfocusGrid();
41 }
42 }

◆ UpdateInterval()

override void UpdateInterval ( )
inlineprotected
215 {
216 m_IsProcessing = true;
217 super.UpdateInterval();
218 m_IsProcessing = false;
219
220 float x, y;
221 float x2, y2;
222 m_ContentParent.GetScreenSize( x, y );
223 m_MainWidget.GetScreenSize( x2, y2 );
224 if ( y2 != y )
225 m_ShouldChangeSize = true;
226 bool changed_size;
227 //if ( m_ShouldChangeSize )
228 m_ContentResize.ResizeParentToChild( changed_size );
230 {
231 m_MainWidget.Update();
232 m_RootWidget.Update();
233 m_ScrollWidget.Update();
234 m_ShouldChangeSize = false;
235 }
236 CheckScrollbarVisibility();
237 }

Перекрестные ссылки m_ContentParent, m_ContentResize, m_IsProcessing, m_RootWidget, m_ScrollWidget, m_ShouldChangeSize, x и y.

◆ UpdateSelectionIcons()

override void UpdateSelectionIcons ( )
inlineprotected
67 {
68 #ifdef PLATFORM_CONSOLE
69 ScrollToActiveContainer();
70 #endif
71 m_UpIcon.Show( m_IsActive );
72 m_DownIcon.Show( m_IsActive );
73 if( m_IsActive )
74 {
75 float x, y;
76 m_UpIcon.GetScreenSize( x, y );
77
79 m_UpIcon.SetPos( 0, Math.Clamp( top_y, 0, 99999 ) );
80
81 #ifndef PLATFORM_CONSOLE
82 float x2, y2;
83 m_DownIcon.GetScreenSize( x2, y2 );
85
86 float diff = bottom_y - ( top_y + y );
87 if( diff < 0 )
88 {
89 top_y += diff / 2;
90 bottom_y -= diff / 2;
91 }
92 m_DownIcon.SetPos( 0, bottom_y );
93 #endif
94 }
95 }
bool m_IsActive
Definition ModifierBase.c:20
float GetCurrentContainerTopY()
Definition LeftArea.c:97
float GetCurrentContainerBottomY()
Definition LeftArea.c:107
Definition EnMath.c:7
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.

Перекрестные ссылки Math::Clamp(), GetCurrentContainerBottomY(), GetCurrentContainerTopY(), m_DownIcon, m_IsActive, m_UpIcon, x и y.

Используется в Refresh() и SetActive().

Поля

◆ m_ContentParent

Widget m_ContentParent
protected

Используется в LeftArea() и UpdateInterval().

◆ m_ContentResize

ref SizeToChild m_ContentResize
protected

Используется в LeftArea() и UpdateInterval().

◆ m_DownIcon

Widget m_DownIcon
protected

Используется в LeftArea() и UpdateSelectionIcons().

◆ m_IsProcessing

bool m_IsProcessing = false
protected

Используется в OnChildAdd(), OnChildRemove() и UpdateInterval().

◆ m_ScrollWidget

ScrollWidget m_ScrollWidget
protected

Используется в GetScrollWidget(), LeftArea(), Refresh() и UpdateInterval().

◆ m_ShouldChangeSize

bool m_ShouldChangeSize = true
protected

Используется в Refresh() и UpdateInterval().

◆ m_UpIcon

Widget m_UpIcon
protected

Используется в LeftArea() и UpdateSelectionIcons().

◆ m_VicinityContainer


Объявления и описания членов класса находятся в файле: