DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс LayoutHolder
+ Граф наследования: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 ()
 

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

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
 

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

Методы

◆ AddItemToQuickbarRadial()

bool AddItemToQuickbarRadial ( EntityAI itemToAssign)
inlineprotected
626 {
628 {
631 dpi = player.GetDayZPlayerInventory();
632
633 if (itemToAssign && dpi && !dpi.IsProcessing())
634 {
635 RadialQuickbarMenu.SetItemToAssign(itemToAssign);
636
637 //open radial quickbar menu
638 if (!GetGame().GetUIManager().IsMenuOpen(MENU_RADIAL_QUICKBAR))
639 {
640 RadialQuickbarMenu.OpenMenu(GetGame().GetUIManager().FindMenu(MENU_INVENTORY));
641 }
642 }
643 return true;
644 }
645 return false;
646 }
PlayerBase GetPlayer()
Definition ModifierBase.c:51
Definition DayZPlayerInventory.c:125
bool CanAddToQuickbarEx(EntityAI focusedEntity)
Definition Container.c:608
Definition EntityAI.c:95
Definition PlayerBaseClient.c:2
proto native CGame GetGame()
const int MENU_INVENTORY
Definition constants.c:178
const int MENU_RADIAL_QUICKBAR
Definition constants.c:196

Перекрестные ссылки GetGame(), GetPlayer(), MENU_INVENTORY и MENU_RADIAL_QUICKBAR.

◆ CanAddToQuickbarEx()

bool CanAddToQuickbarEx ( EntityAI focusedEntity)
inlineprotected
609 {
610 if ( ItemManager.GetInstance().IsMicromanagmentMode() )
611 return false;
612
613 if (focusedEntity)
614 {
616 if (focusedEntity.GetHierarchyRootPlayer() == player)
617 {
618 return true;
619 }
620 }
621
622 return false;
623 }
Definition ItemManager.c:2
static ItemManager GetInstance()
Definition ItemManager.c:283

Перекрестные ссылки GetGame(), ItemManager::GetInstance() и GetPlayer().

◆ CanCombine()

bool CanCombine ( )
inlineprotected
572 {
574 if (focusedEntity)
575 {
577 return GetFocusedContainer().CanCombineEx(focusedEntity);
578
580 }
581
582 return false;
583 }
Definition Building.c:6
EntityAI GetFocusedItem()
Definition Container.c:667
Container GetFocusedContainer()
Definition Container.c:48
bool CanCombineEx(EntityAI focusedEntity)
Definition Container.c:585

Перекрестные ссылки Container::GetFocusedItem().

◆ CanCombineAmmo()

bool CanCombineAmmo ( )
inlineprotected
602 {
603 if( GetFocusedContainer() )
605 return false;
606 }
override bool CanCombineAmmo()
Definition CargoContainer.c:795

◆ CanCombineEx()

bool CanCombineEx ( EntityAI focusedEntity)
inlineprotected
586 {
587 if (ItemManager.GetInstance().IsMicromanagmentMode())
588 return false;
589
590 if (focusedEntity)
591 {
592 EntityAI entityInHands = PlayerBase.Cast(GetGame().GetPlayer()).GetItemInHands();
594 {
596 }
597 }
598 return false;
599 }
static int GetCombinationFlags(EntityAI entity1, EntityAI entity2)
Definition ItemManager.c:793

Перекрестные ссылки ItemManager::GetCombinationFlags(), GetGame(), ItemManager::GetInstance() и GetPlayer().

◆ CanDrop()

bool CanDrop ( )
inlineprotected
421 {
423 if (focusedEntity)
424 {
426 return GetFocusedContainer().CanDropEx(focusedEntity);
427
428 return CanDropEx(focusedEntity);
429
430 }
431
432 return false;
433 }
bool CanDropEx(EntityAI focusedEntity)
Definition Container.c:435

Перекрестные ссылки Container::GetFocusedItem().

◆ CanDropEx()

bool CanDropEx ( EntityAI focusedEntity)
inlineprotected
436 {
437 if ( ItemManager.GetInstance().IsMicromanagmentMode() )
438 return false;
439
440 if (focusedEntity)
441 {
443
444 if (player)
445 {
446 return player.CanDropEntity(focusedEntity);
447 }
448 }
449 return false;
450 }

Перекрестные ссылки GetGame(), ItemManager::GetInstance() и GetPlayer().

◆ CanEquip()

bool CanEquip ( )
inlineprotected
497 {
499 if (focusedEntity)
500 {
502 return GetFocusedContainer().CanEquipEx(focusedEntity);
503
505 }
506
507 return false;
508 }
bool CanEquipEx(EntityAI focusedEntity)
Definition Container.c:510

Перекрестные ссылки Container::GetFocusedItem().

◆ CanEquipEx()

bool CanEquipEx ( EntityAI focusedEntity)
inlineprotected
511 {
512 if ( ItemManager.GetInstance().IsMicromanagmentMode() )
513 return false;
514
515 bool found = false;
516 if (focusedEntity)
517 {
520 found = player.GetInventory().FindFreeLocationFor(focusedEntity,FindInventoryLocationType.ATTACHMENT, il);
521
522 if (found && il.GetParent().GetInventory().FindAttachment(il.GetSlot()))
523 {
524 found = false;
525 }
526 else if (!found)
527 {
528 for (int i = 0; i < focusedEntity.GetInventory().GetSlotIdCount(); i++)
529 {
530 int slot_id = focusedEntity.GetInventory().GetSlotId(i);
531 EntityAI slot_item = player.GetInventory().FindAttachment( slot_id );
532 if (slot_item && player.GetInventory().CanSwapEntitiesEx( focusedEntity, slot_item ))
533 {
534 found = true;
535 break;
536 }
537
538 }
539 }
540 }
541 return found;
542 }
FindInventoryLocationType
flags for searching locations in inventory
Definition InventoryLocation.c:17
InventoryLocation.
Definition InventoryLocation.c:29

Перекрестные ссылки GetGame(), ItemManager::GetInstance() и GetPlayer().

◆ CanOpenCloseContainer()

bool CanOpenCloseContainer ( )
inlineprotected
373 {
374 if ( ItemManager.GetInstance().IsMicromanagmentMode() )
375 return false;
376
378 if (focusedEntity)
379 {
381 return GetFocusedContainer().CanOpenCloseContainerEx(focusedEntity);
382
384 }
385
386 return false;
387 }
bool CanOpenCloseContainerEx(EntityAI focusedEntity)
Definition Container.c:389

Перекрестные ссылки Container::GetFocusedItem() и ItemManager::GetInstance().

◆ CanOpenCloseContainerEx()

bool CanOpenCloseContainerEx ( EntityAI focusedEntity)
inlineprotected
390 {
391 return false;
392 }

◆ CanSplit()

bool CanSplit ( )
inlineprotected
395 {
397 if (focusedEntity)
398 {
400 return GetFocusedContainer().CanSplitEx(focusedEntity);
401
403 }
404
405 return false;
406 }
bool CanSplitEx(EntityAI focusedEntity)
Definition Container.c:408

Перекрестные ссылки Container::GetFocusedItem().

◆ CanSplitEx()

bool CanSplitEx ( EntityAI focusedEntity)
inlineprotected
409 {
410 if ( ItemManager.GetInstance().IsMicromanagmentMode() )
411 return false;
412
413 if (focusedEntity)
414 {
415 return focusedEntity.CanBeSplit();
416 }
417 return false;
418 }

Перекрестные ссылки ItemManager::GetInstance().

◆ CanSwapOrTakeToHands()

bool CanSwapOrTakeToHands ( )
inlineprotected
453 {
455 if (focusedEntity)
456 {
458 return GetFocusedContainer().CanSwapOrTakeToHandsEx(focusedEntity);
459
461 }
462
463 return false;
464 }
bool CanSwapOrTakeToHandsEx(EntityAI focusedEntity)
Definition Container.c:466

Перекрестные ссылки Container::GetFocusedItem().

◆ CanSwapOrTakeToHandsEx()

bool CanSwapOrTakeToHandsEx ( EntityAI focusedEntity)
inlineprotected
467 {
468 if ( ItemManager.GetInstance().IsMicromanagmentMode() )
469 return false;
470
471 if (focusedEntity)
472 {
474 EntityAI entityInHands = player.GetItemInHands();
475 if (entityInHands)
476 {
478
480 {
482 }
483 else
484 {
485 return true;
486 }
487 }
488 else
489 {
490 return player.GetInventory().CanAddEntityIntoHands(focusedEntity);
491 }
492 }
493 return false;
494 }
script counterpart to engine's class Inventory
Definition Inventory.c:79
static bool CanForceSwapEntitiesEx(notnull EntityAI item1, InventoryLocation item1_dst, notnull EntityAI item2, out InventoryLocation item2_dst)
Definition Inventory.c:664
static bool CanSwapEntitiesEx(notnull EntityAI item1, notnull EntityAI item2)
Definition Inventory.c:628

Перекрестные ссылки GameInventory::CanForceSwapEntitiesEx(), GameInventory::CanSwapEntitiesEx(), GetGame(), ItemManager::GetInstance() и GetPlayer().

◆ CanTakeToInventory()

bool CanTakeToInventory ( )
inlineprotected
545 {
547 if (focusedEntity)
548 {
550 return GetFocusedContainer().CanTakeToInventoryEx(focusedEntity);
551
553 }
554
555 return false;
556 }
bool CanTakeToInventoryEx(EntityAI focusedEntity)
Definition Container.c:558

Перекрестные ссылки Container::GetFocusedItem().

◆ CanTakeToInventoryEx()

bool CanTakeToInventoryEx ( EntityAI focusedEntity)
inlineprotected
559 {
560 if ( ItemManager.GetInstance().IsMicromanagmentMode() )
561 return false;
562
563 if (focusedEntity)
564 {
566 return player.GetInventory().CanAddEntityToInventory(focusedEntity,FindInventoryLocationType.CARGO);
567 }
568 return false;
569 }

Перекрестные ссылки GetGame(), ItemManager::GetInstance() и GetPlayer().

◆ CheckHeaderDragability()

void CheckHeaderDragability ( )
protected

◆ CheckScrollbarVisibility()

void CheckScrollbarVisibility ( )
inlineprotected
185 {
187 if (sw)
188 {
189 if (!sw.IsScrollbarVisible())
190 {
191 sw.VScrollToPos01(0.0);
192 }
193 else if (sw.GetVScrollPos01() > 1.0)
194 {
195 sw.VScrollToPos01(1.0);
196 }
197 }
198 }
ScrollWidget GetScrollWidget()
Definition Container.c:92

◆ Close()

void Close ( )
inlineprotected
207 {
208 m_Closed = true;
210 }
override void UpdateSelectionIcons()
Definition Container.c:1360
bool m_Closed
Definition Container.c:7

◆ Combine()

bool Combine ( )
inlineprotected
331 {
332 if( GetFocusedContainer() )
333 return GetFocusedContainer().Combine();
334 return true;
335 }
override bool Combine()
Definition CargoContainer.c:948

◆ Container()

void Container ( LayoutHolder parent)
inlineprotected
36 {
39 m_PrevAlpha = m_RootWidget.GetAlpha();
41 m_ForcedHide = false;
42 m_ForcedShow = false;
43
44 m_ActiveIndex = 0;
45 m_IsActive = false;
46 }
bool m_IsActive
Definition ModifierBase.c:19
ref Widget m_RootWidget[MAX_SIMULTANIOUS_PLAYERS]
Definition PluginRemotePlayerDebugClient.c:14
int m_ActiveIndex
Definition Container.c:5
ref array< ref LayoutHolder > m_Body
Definition Container.c:3
float m_PrevAlpha
Definition Container.c:9
SlotsIcon m_SlotIcon
Definition Container.c:19
ref array< LayoutHolder > m_OpenedContainers
Definition Container.c:4
bool m_ForcedHide
Definition Container.c:16
bool m_ForcedShow
Definition Container.c:17

Перекрестные ссылки m_IsActive и m_RootWidget.

◆ Count()

◆ DraggingOver()

void DraggingOver ( Widget w,
int x,
int y,
Widget receiver )
protected

◆ DraggingOverHeader()

void DraggingOverHeader ( Widget w,
int x,
int y,
Widget receiver )
protected

◆ EquipItem()

bool EquipItem ( )
inlineprotected
366 {
367 if( GetFocusedContainer() )
369 return false;
370 }
override bool EquipItem()
Definition CargoContainer.c:851

◆ ExpandCollapseContainer()

void ExpandCollapseContainer ( )
inlineprotected
1365{}

◆ Get()

LayoutHolder Get ( int x)
inlineprotected
1300 {
1301 return m_Body.Get( x );
1302 }
Icon x

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

Используется в PluginBase::Broadcast(), PluginBase::BroadcastFloat(), PluginBase::BroadcastInt(), PluginBase::BroadcastParam() и PluginBase::BroadcastString().

◆ GetActiveIndex()

int GetActiveIndex ( )
inlineprotected
83 {
84 return m_ActiveIndex;
85 }

◆ GetColumnCount()

int GetColumnCount ( )
inlineprotected
685 {
686 return m_ColumnCount;
687 }
int m_ColumnCount
Definition Container.c:13

◆ GetContainer()

Container GetContainer ( int index)
inlineprotected
58 {
59 if (index < m_Body.Count())
60 {
61 return Container.Cast( m_Body[index] );
62 }
63 return null;
64 }
Definition CargoContainer.c:3

◆ GetFocusedColumn()

int GetFocusedColumn ( )
inlineprotected
695 {
696 return m_FocusedColumn;
697 }
int m_FocusedColumn
Definition Container.c:15

◆ GetFocusedContainer()

Container GetFocusedContainer ( )
inlineprotected
49 {
51 {
53 }
54 return null;
55 }

◆ GetFocusedContainerEntity()

EntityAI GetFocusedContainerEntity ( )
inlineprotected
677 {
679 if( GetFocusedContainer() )
680 item = GetFocusedContainer().GetFocusedContainerEntity();
681 return item;
682 }

◆ GetFocusedContainerHeight()

float GetFocusedContainerHeight ( bool contents = false)
inlineprotected
249 {
250 float x, y, result;
251 if( GetFocusedContainer() )
253 else if( GetRootWidget() )
254 GetRootWidget().GetScreenSize( x, y );
255
256 result = y;
257
258 if ( m_ActiveIndex == 0 )
259 {
260 if ( GetHeader() )
261 {
262 GetHeader().GetRootWidget().GetScreenSize( x, y );
263 result += y;
264 }
265 }
266 return result;
267 }
Icon y
override float GetFocusedContainerHeight(bool contents=false)
Definition CargoContainer.c:436
Header GetHeader()

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

Используется в Container::GetFocusedContainerHeight() и GetFocusedContainerHeight().

◆ GetFocusedContainerYPos()

float GetFocusedContainerYPos ( bool contents = false)
inlineprotected
270 {
271 float x, y;
272 if( GetFocusedContainer() )
274 else if( GetRootWidget() )
275 GetRootWidget().GetPos( x, y );
276
277 return y;
278 }
override float GetFocusedContainerYPos(bool contents=false)
Definition CargoContainer.c:446

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

Используется в Container::GetFocusedContainerYPos() и GetFocusedContainerYPos().

◆ GetFocusedContainerYScreenPos()

float GetFocusedContainerYScreenPos ( bool contents = false)
inlineprotected
281 {
282 float x, y, result;
283 if( GetFocusedContainer() )
285 else if( GetRootWidget() )
286 GetRootWidget().GetScreenPos( x, y );
287
288
289 result = y;
290
291 if ( m_ActiveIndex == 0 )
292 {
293 if ( GetHeader() )
294 {
295 GetHeader().GetRootWidget().GetScreenPos( x, y );
296 result = y;
297 }
298 }
299 return result;
300 }
override float GetFocusedContainerYScreenPos(bool contents=false)
Definition CargoContainer.c:456

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

Используется в Container::GetFocusedContainerYScreenPos() и GetFocusedContainerYScreenPos().

◆ GetFocusedItem()

EntityAI GetFocusedItem ( )
inlineprotected
668 {
670 if( GetFocusedContainer() )
672
673 return item;
674 }
override EntityAI GetFocusedItem()
Definition CargoContainer.c:722

◆ GetFocusedSlotsIcon()

SlotsIcon GetFocusedSlotsIcon ( )
inlineprotected
73 {
75 if (c)
76 {
77 return c.GetFocusedSlotsIcon();
78 }
79 return null;
80 }

◆ GetHeader()

Header GetHeader ( )
protected

◆ GetScrollWidget()

ScrollWidget GetScrollWidget ( )
inlineprotected
93 {
94 return null;
95 }

◆ HideContent()

void HideContent ( bool force_hide = false)
inlineprotected
1328 {
1329 if( !m_ForcedHide )
1330 {
1332 }
1333 for(int i = 0; i < m_Body.Count(); i++)
1334 {
1335 if( m_Body.Get( i ) )
1336 m_Body.Get( i ).OnHide();
1337 }
1338 }

◆ Insert()

void Insert ( LayoutHolder container,
int pos = -1,
bool immedUpdate = true )
inlineprotected
1255 {
1256 if ( pos > -1 && pos < m_Body.Count() )
1257 {
1258 if ( pos <= m_ActiveIndex )
1259 m_ActiveIndex++;
1260 m_Body.InsertAt( container, pos );
1261 }
1262 else
1263 m_Body.Insert( container );
1264
1265 if ( immedUpdate )
1266 Refresh();
1267 }
override void Refresh()
Definition Container.c:1304

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

◆ InspectItem()

bool InspectItem ( )
inlineprotected
352 {
353 if( GetFocusedContainer() )
354 return GetFocusedContainer().InspectItem();
355 return false;
356 }

Используется в Icon::MouseClick().

◆ IsEmpty()

bool IsEmpty ( )
inlineprotected
649 {
650 return m_OpenedContainers.Count() == 0;
651 }

◆ IsFirstContainerFocused()

bool IsFirstContainerFocused ( )
inlineprotected
873 {
874 return m_ActiveIndex == 0;
875 }

◆ IsFirstIndex()

bool IsFirstIndex ( )
inlineprotected
868 {
869 return m_ActiveIndex == 0;
870 }

◆ IsItemActive()

bool IsItemActive ( )
inlineprotected
654 {
655 if( GetFocusedContainer() )
657 return false;
658 }
override bool IsItemActive()
Definition CargoContainer.c:764

◆ IsItemWithQuantityActive()

bool IsItemWithQuantityActive ( )
inlineprotected
661 {
662 if( GetFocusedContainer() )
664 return false;
665 }
override bool IsItemWithQuantityActive()
Definition CargoContainer.c:774

◆ IsLastContainerFocused()

bool IsLastContainerFocused ( )
inlineprotected
878 {
879 return m_ActiveIndex >= ( m_OpenedContainers.Count() - 1 );
880 }

◆ IsLastIndex()

bool IsLastIndex ( )
inlineprotected
863 {
864 return m_ActiveIndex == ( m_OpenedContainers.Count() - 1 );
865 }

◆ IsOpened()

bool IsOpened ( )
inlineprotected
213 {
214 return !m_Closed;
215 }

◆ MoveGridCursor()

void MoveGridCursor ( int direction)
inlineprotected
130 {
131 if ( direction == Direction.UP )
132 {
134 }
135 else if ( direction == Direction.DOWN )
136 {
138 }
139 else if ( direction == Direction.RIGHT )
140 {
142 }
143 else if ( direction == Direction.LEFT )
144 {
146 }
147
149
150 Inventory.GetInstance().UpdateConsoleToolbar();
151 }
Direction
Definition Inventory.c:19
void Inventory(LayoutHolder parent)
Definition Inventory.c:76
void SetPreviousActive(bool force=false)
Definition Container.c:928
void SetNextLeftActive()
Definition Container.c:978
void SetNextRightActive()
Definition Container.c:964
void SetNextActive()
Definition Container.c:892

Перекрестные ссылки Inventory(), Container::SetNextActive(), Container::SetNextLeftActive(), Container::SetNextRightActive() и Container::SetPreviousActive().

◆ OnDropReceivedFromHeader()

void OnDropReceivedFromHeader ( Widget w,
int x,
int y,
Widget receiver )
protected

◆ OnSelectButton()

bool OnSelectButton ( )
inlineprotected
322 {
324 {
325 return GetFocusedContainer().OnSelectButton();
326 }
327 return false;
328 }

◆ Open()

void Open ( )
inlineprotected
201 {
202 m_Closed = false;
204 }

◆ RecomputeOpenedContainers()

void RecomputeOpenedContainers ( )
inlineprotected
1202 {
1203 m_OpenedContainers.Clear();
1204 int i;
1205 bool need_reset_focus = false;
1206 Container c;
1207 for (i = 0; i < m_Body.Count(); i++)
1208 {
1209 c = Container.Cast(m_Body.Get( i ));
1210 if ( c )
1211 {
1212 c.RecomputeOpenedContainers();
1213 if (c.IsDisplayable() && c.IsVisible())
1214 {
1215 m_OpenedContainers.Insert(c);
1216 }
1217 else if (c.IsActive())
1218 {
1219 c.SetActive(false);
1220 need_reset_focus = true;
1221 }
1222
1223 }
1224 }
1225
1226 //In case of removing focused container or change order of containers
1227 if (IsActive())
1228 {
1230 {
1231 need_reset_focus = true;
1232 for (i = 0; i < m_OpenedContainers.Count(); i++)
1233 {
1235 {
1236 need_reset_focus = false;
1237 m_ActiveIndex = i;
1238 }
1239 }
1240 }
1241
1242 if (need_reset_focus)
1243 {
1245 }
1246 }
1247 }
bool IsActive()
Definition ModifierBase.c:130
override void SetFirstActive()
Definition Container.c:759

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

◆ Refresh()

override void Refresh ( )
inlineprotected
1305 {
1306 for ( int i = 0; i < m_Body.Count(); i++ )
1307 {
1308 if( m_Body.Get( i ) )
1309 m_Body.Get( i ).Refresh();
1310 }
1311 }

◆ Remove()

void Remove ( LayoutHolder container)
inlineprotected
1270 {
1271 if( m_Body )
1272 {
1273 int index = m_Body.Find( container );
1274 if( index > -1 )
1275 {
1277 if (index > -1)
1278 {
1279 if (index <= m_ActiveIndex)
1280 {
1282 {
1283 SetPreviousActive( true );
1284 }
1285 else
1286 {
1287 m_ActiveIndex--;
1288 }
1289 }
1290 m_OpenedContainers.RemoveItem( container );
1291 }
1292 m_Body.RemoveItem( container );
1293 }
1294 }
1295
1296 Refresh();
1297 }

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

◆ ResetFocusedContainer()

void ResetFocusedContainer ( )
inlineprotected
883 {
884 if ( GetFocusedContainer() )
885 {
886 GetFocusedContainer().ResetFocusedContainer();
887 }
888
889 m_ActiveIndex == 0;
890 }

◆ ScrollToActiveContainer()

void ScrollToActiveContainer ( )
inlineprotected
154 {
156 if (sw)
157 {
158 float x, y, y_s;
159
160 sw.GetScreenPos( x, y );
161 sw.GetScreenSize( x, y_s );
162 float f_y,f_h;
163 float amount;
166
167 float next_pos = f_y + f_h;
168
169 if (next_pos > ( y + y_s ))
170 {
171 amount = sw.GetVScrollPos() + next_pos - ( y + y_s ) + 2;
172 sw.VScrollToPos( amount );
173 }
174 else if (f_y < y)
175 {
176 amount = sw.GetVScrollPos() + f_y - y - 2;
177 sw.VScrollToPos(amount);
178 }
179
180 //CheckScrollbarVisibility();
181 }
182 }
float GetFocusedContainerHeight(bool contents=false)
Definition Container.c:248
float GetFocusedContainerYScreenPos(bool contents=false)
Definition Container.c:280

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

◆ Select()

bool Select ( )
inlineprotected
315 {
316 if( GetFocusedContainer() )
317 return GetFocusedContainer().Select();
318 return false;
319 }
override bool Select()
Definition CargoContainer.c:883

◆ SelectItem()

bool SelectItem ( )
inlineprotected
308 {
309 if( GetFocusedContainer() )
311 return false;
312 }
override bool SelectItem()
Definition CargoContainer.c:868

◆ SetActive()

override void SetActive ( bool active)
inlineprotected
790 {
791 if (!active)
792 {
793 HideOwnedTooltip();
794 }
795
796 if (!active && !m_IsActive)
797 return;
798
799 super.SetActive( active );
800 if ( GetHeader() )
801 {
803 }
804
805 if (m_MainWidget.FindAnyWidget("SelectedContainer"))
806 {
807 m_MainWidget.FindAnyWidget("SelectedContainer").Show(active);
808 }
809
810 Container c;
811 if( active )
812 {
813
815 if( m_OpenedContainers.Count() )
816 {
818 if (c)
819 {
820 c.SetActive(active);
821 }
822 }
823 }
824 else
825 {
827 if (c)
828 {
830 }
831 Unfocus();
832 m_ActiveIndex = 0;
833 m_FocusedColumn = 0;
834 }
835 }
override void SetActive(bool active)
Definition CargoContainer.c:758
override void SetActive(bool active)
Definition Header.c:64
void SetDefaultFocus(bool while_micromanagment_mode=false)
Definition Container.c:110
void Unfocus()
Definition Container.c:125

Перекрестные ссылки Container::GetHeader(), m_IsActive, Container::SetDefaultFocus() и Container::Unfocus().

◆ SetActiveIndex()

void SetActiveIndex ( int index)
inlineprotected
88 {
90 }

◆ SetColumnCount()

void SetColumnCount ( int count)
inlineprotected
690 {
692 }

◆ SetDefaultFocus()

void SetDefaultFocus ( bool while_micromanagment_mode = false)
inlineprotected
111 {
112 m_ActiveIndex = 0;
113 }

◆ SetFirstActive()

override void SetFirstActive ( )
inlineprotected
760 {
761 if (!m_IsActive)
762 {
763 SetActive(true);
764 }
765 else
766 {
767 if (m_OpenedContainers.Count())
768 {
771 {
772 for (int i = 1; i < m_OpenedContainers.Count(); i++)
773 {
775 {
776 m_OpenedContainers[i].SetActive(false);
777 }
778 }
779 m_OpenedContainers[m_ActiveIndex].SetActive(true);
780 }
781 else
782 {
783 m_OpenedContainers[m_ActiveIndex].SetFirstActive();
784 }
785 }
786 }
787 }
void SetActive()
Definition TrapBase.c:419

Перекрестные ссылки IsActive(), m_IsActive, SetActive() и Container::SetDefaultFocus().

◆ SetFocusedColumn()

void SetFocusedColumn ( int column)
inlineprotected
700 {
702 }

◆ SetFocusedContainer()

void SetFocusedContainer ( Container cont)
inlineprotected
68 {
70 }
Container m_FocusedContainer
Definition Container.c:8

◆ SetForceShow()

void SetForceShow ( bool value)
inlineprotected
1356 {
1358 }

◆ SetHeader()

void SetHeader ( Header header)
protected

◆ SetLastActive()

override void SetLastActive ( )
inlineprotected
716 {
717 if (m_IsActive)
718 {
719 m_IsActive = true;
720 if (m_OpenedContainers.Count())
721 {
722 SetLastFocus();
724 {
725 for (int i = 0; i < m_OpenedContainers.Count() - 1; i++)
726 {
728 {
729 m_OpenedContainers[i].SetActive(false);
730 }
731 }
732 m_OpenedContainers[m_ActiveIndex].SetLastActive();
733 }
734 else
735 {
736 m_OpenedContainers[m_ActiveIndex].SetLastActive();
737 }
738 }
739 }
740 else
741 {
742 m_IsActive = true;
743 if (GetHeader())
744 {
746 }
747 SetLastFocus();
748 if (m_OpenedContainers.Count())
749 {
751 if (c)
752 {
753 c.SetLastActive( );
754 }
755 }
756 }
757 }
void SetLastFocus()
Definition Container.c:115

Перекрестные ссылки Container::GetHeader(), IsActive(), m_IsActive и Container::SetLastFocus().

◆ SetLastFocus()

void SetLastFocus ( )
inlineprotected
116 {
117 m_ActiveIndex = 0;
118 m_FocusedColumn = 0;
119 if ( m_OpenedContainers.Count() > 0 )
120 {
121 m_ActiveIndex = m_OpenedContainers.Count() - 1;
122 }
123 }

◆ SetLayoutName()

override void SetLayoutName ( )
inlineprotected
1250 {
1251 m_LayoutName = WidgetLayoutName.Container;
1252 }
Definition WidgetLayoutName.c:2
const string Container
Definition WidgetLayoutName.c:47

Перекрестные ссылки WidgetLayoutName::Container.

Используется в ScriptedWidgetEventHandler::LayoutHolder().

◆ SetNextActive()

void SetNextActive ( )
inlineprotected
893 {
894 HideOwnedTooltip();
895
897 if (m_OpenedContainers.Count())
898 {
900 }
901
902 if (active && active.IsActive())
903 {
904 active.SetNextActive();
905 }
906 if (!active || !active.IsActive())
907 {
910 {
912
914 next.SetActive(true);
915 }
916 else if (Container.Cast( GetParent() ))
917 {
918 SetActive(false);
919 }
920 else
921 {
922 SetActive(false);
924 }
925 }
926 }
bool IsLastContainerFocused()
Definition Container.c:877
proto native Widget GetParent()
Get parent of the Effect.
Definition Effect.c:407

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

◆ SetNextLeftActive()

void SetNextLeftActive ( )
inlineprotected
979 {
981 if (m_OpenedContainers.Count())
982 {
984 }
985
986 if (active)
987 {
988 active.SetNextLeftActive();
989 }
990 }

◆ SetNextRightActive()

void SetNextRightActive ( )
inlineprotected
965 {
967 if (m_OpenedContainers.Count())
968 {
970 }
971
972 if (active)
973 {
974 active.SetNextRightActive();
975 }
976 }

◆ SetOpenForSlotIcon()

void SetOpenForSlotIcon ( bool open,
SlotsIcon icon = null )
inlineprotected
218 {
219 if (!icon)
220 {
222 }
223
224 if (icon)
225 {
226 icon.GetRadialIcon().Show(open);
227 icon.GetRadialIconClosed().Show(!open);
228 }
229 /*else
230 {
231 ErrorEx("Dbg No Icon");
232 }*/
233 }

◆ SetPreviousActive()

void SetPreviousActive ( bool force = false)
inlineprotected
929 {
930 HideOwnedTooltip();
932 if (m_OpenedContainers.Count())
933 {
935 }
936
937 if (active && active.IsActive())
938 {
939 active.SetPreviousActive();
940 }
941
942 if (!active || !active.IsActive())
943 {
946 {
948
950 prev.SetLastActive();
951 }
952 else if (Container.Cast( GetParent() ))
953 {
954 SetActive(false);
955 }
956 else
957 {
958 SetActive(false);
960 }
961 }
962 }
bool IsFirstContainerFocused()
Definition Container.c:872
override void SetLastActive()
Definition Container.c:715

Перекрестные ссылки GetParent(), SetActive() и Container::SetLastActive().

◆ SetSameLevelNextActive()

void SetSameLevelNextActive ( )
inlineprotected
993 {
994 Icon icon;
997 if (ClosableContainer.Cast(active) && active.m_OpenedContainers.Count()) // Check if current active container has any opened nested containers and go through them
998 {
999 active.SetNextActive();
1000
1001 ContainerWithCargoAndAttachments cwcaa;
1002 if (Class.CastTo(cwcaa, active))
1003 {
1004 if (cwcaa.GetAttachmentCargos())
1005 {
1006 bool foundActive;
1007 for (int i = 0; i < cwcaa.GetAttachmentCargos().Count(); i++)
1008 {
1009 Entity entA = cwcaa.GetAttachmentCargos().GetKey(i);
1010 CargoContainer cc = cwcaa.GetAttachmentCargos().GetElement(i);
1011 if (cc && cc.IsActive())
1012 {
1013 icon = cc.GetIcon(0);
1014 if (icon && !icon.IsActive())
1015 {
1016 cwcaa.SetActive(false);
1017 }
1018 }
1019 }
1020 }
1021
1022 if (cwcaa.GetAttachmentAttachmentsContainers())
1023 {
1024 for (int j = 0; j < cwcaa.GetAttachmentAttachmentsContainers().Count(); j++)
1025 {
1026 Entity entB = cwcaa.GetAttachmentAttachmentsContainers().GetKey(j);
1027 AttachmentsWrapper aw = cwcaa.GetAttachmentAttachmentsContainers().GetElement(j);
1028 if (aw && aw.IsActive())
1029 {
1030 aw.SetFirstActive();
1031 }
1032 }
1033 }
1034
1035 if (cwcaa && cwcaa.GetCargo() && cwcaa.GetCargo().IsActive())
1036 {
1037 icon = cwcaa.GetCargo().GetIcon(0);
1038 if (icon && !icon.IsActive())
1039 {
1040 cwcaa.SetActive(false);
1041 }
1042 }
1043 }
1044
1045 ContainerWithCargo cwc;
1046 if (Class.CastTo(cwc, active) && cwc.GetCargo())
1047 {
1048 icon = cwc.GetCargo().GetIcon(0);
1049 if (icon && !icon.IsActive())
1050 {
1051 cwc.SetActive(false);
1052 }
1053 }
1054 }
1055 else
1056 {
1057 active.SetActive(false);
1058
1059 m_ActiveIndex++;
1060 if (m_ActiveIndex > m_OpenedContainers.Count() - 1)
1061 {
1062 m_ActiveIndex = 0;
1063 }
1064
1066 active.SetActive(true);
1067 }
1068
1069 if (!active || !active.IsActive())
1070 {
1072 {
1073 m_ActiveIndex++;
1075
1076 ContainerWithCargo cwcn;
1077 if (Class.CastTo(cwcn, next) && cwcn.GetCargo())
1078 {
1079 icon = cwcn.GetCargo().GetIcon(0);
1080 if (icon && icon.IsActive())
1081 {
1082 SetActive(false);
1083 }
1084 else
1085 {
1086 cwcn.SetFirstActive();
1087 }
1088 }
1089 else
1090 {
1091 next.SetActive(true);
1092 }
1093 }
1094 else
1095 {
1096 SetActive(false);
1098 }
1099 }
1100 }
Definition AttachmentsWrapper.c:2
Super root of all classes in Enforce script.
Definition EnScript.c:11
Definition ContainerWithCargo.c:2
Definition Camera.c:2
Definition Icon.c:2
int Count()
Definition Container.c:302
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

Перекрестные ссылки Container::CargoContainer(), Class::CastTo(), Count и SetActive().

◆ SetSameLevelPreviousActive()

void SetSameLevelPreviousActive ( )
inlineprotected
1103 {
1104 Icon icon;
1106 ContainerWithCargoAndAttachments cwcaa;
1107 ContainerWithCargo cwc;
1108 int i;
1109
1110 if (m_OpenedContainers.Count())
1111 {
1113 }
1114
1115 if (active && active.IsActive())
1116 {
1117 if (Class.CastTo(cwcaa, active))
1118 {
1119 if (cwcaa.GetAttachmentCargos())
1120 {
1121 for (i = 0; i < cwcaa.GetAttachmentCargos().Count(); i++)
1122 {
1123 Entity entA = cwcaa.GetAttachmentCargos().GetKey(i);
1124 CargoContainer cc = cwcaa.GetAttachmentCargos().GetElement(i);
1125 if (cc && cc.IsActive())
1126 {
1127 icon = cc.GetIcon(cc.GetIconsCount() - 1);
1128 if (icon && !icon.IsActive())
1129 {
1130 cc.SetActive(false);
1131 }
1132 }
1133 }
1134 }
1135
1136 if (cwcaa && cwcaa.GetCargo() && cwcaa.GetCargo().IsActive())
1137 {
1138 cwcaa.SetFirstActive();
1139 }
1140 else
1141 {
1142 active.SetPreviousActive();
1143 }
1144 }
1145 else
1146 {
1147 if (Class.CastTo(cwc, active))
1148 {
1149 if (cwc && cwc.GetCargo() && cwc.GetCargo().IsActive())
1150 {
1151 active.SetActive(false);
1152 }
1153 }
1154 else
1155 {
1156 active.SetActive(false);
1157
1158 m_ActiveIndex--;
1159 if (m_ActiveIndex < 0)
1160 {
1161 m_ActiveIndex = m_OpenedContainers.Count() - 1;
1162 }
1163
1165 active.SetLastActive();
1166 }
1167 }
1168 }
1169
1170 if (!active || !active.IsActive())
1171 {
1174 {
1175 m_ActiveIndex--;
1177 if (Class.CastTo(cwc, prev))
1178 {
1179 if (cwc && cwc.GetCargo() && cwc.GetCargo().IsActive())
1180 {
1181 prev.SetActive(false);
1182 }
1183 else
1184 {
1185 prev.SetLastActive();
1186 }
1187 }
1188 else
1189 {
1190 prev.SetLastActive();
1191 }
1192 }
1193 else
1194 {
1195 SetActive(false);
1196 SetLastActive();
1197 }
1198 }
1199 }

Перекрестные ссылки Container::CargoContainer(), Class::CastTo(), Count, SetActive() и Container::SetLastActive().

◆ SetSlotIcon()

void SetSlotIcon ( SlotsIcon icon)
inlineprotected
106 {
108 }

◆ ShowContent()

void ShowContent ( bool force_show = false)
inlineprotected
1341 {
1342 if( force_show )
1343 m_ForcedHide = false;
1344
1345 if( !m_ForcedHide )
1346 {
1347 for(int i = 0; i < m_Body.Count(); i++)
1348 {
1349 if( m_Body.Get( i ) )
1350 m_Body.Get( i ).OnShow();
1351 }
1352 }
1353 }

◆ SplitItem()

bool SplitItem ( )
inlineprotected
359 {
360 if( GetFocusedContainer() )
362 return false;
363 }
override bool SplitItem()
Definition CargoContainer.c:826

◆ Toggle()

void Toggle ( )
inlineprotected
236 {
237 if (IsOpened())
238 {
239 Close();
240 }
241 else
242 {
243 Open();
244 }
246 }
void Open()
Definition Container.c:200
void Close()
Definition Container.c:206
bool IsOpened()
Definition Container.c:212
void SetOpenForSlotIcon(bool open, SlotsIcon icon=null)
Definition Container.c:217

Перекрестные ссылки Container::Close(), IsOpened() и Container::Open().

◆ TransferItem()

bool TransferItem ( )
inlineprotected
345 {
346 if( GetFocusedContainer() )
348 return false;
349 }
override bool TransferItem()
Definition CargoContainer.c:809

◆ TransferItemToVicinity()

bool TransferItemToVicinity ( )
inlineprotected
338 {
339 if( GetFocusedContainer() )
341 return false;
342 }
override bool TransferItemToVicinity()
Definition CargoContainer.c:580

◆ Unfocus()

void Unfocus ( )
inlineprotected
126 {
127 }

◆ UnfocusAll()

void UnfocusAll ( )
inlineprotected
838 {
839 for ( int i = 0; i < Count(); i++ )
840 {
841 for ( int j = 0; j < ITEMS_IN_ROW; j++ )
842 {
844 if (Get(i) && Get(i).GetMainWidget())
845 Get( i ).GetMainWidget().GetUserData(icon);
846
847 if (icon)
848 icon.GetCursorWidget().Show( false );
849 }
850 }
851 }
override float Get()
Definition PlayerStatBase.c:137
const int ITEMS_IN_ROW
Definition Container.c:10
Definition SlotsIcon.c:2

Перекрестные ссылки Count, Get() и ITEMS_IN_ROW.

◆ UnfocusGrid()

void UnfocusGrid ( )
inlineprotected
854 {
855 if( GetFocusedContainer() )
856 {
857 m_FocusedColumn = 0;
859 }
860 }
override void UnfocusAll()
Definition CargoContainer.c:624

◆ UpdateBodySpacers()

void UpdateBodySpacers ( )
inlineprotected
1314 {
1315 for ( int i = 0; i < m_Body.Count(); i++ )
1316 {
1317 Container c = Container.Cast( m_Body.Get( i ) );
1318 if( c && c.IsInherited( Container ) )
1319 {
1320 c.UpdateSpacer();
1321 }
1322 }
1323
1324 UpdateSpacer();
1325 }
void UpdateSpacer()

◆ UpdateInterval()

override void UpdateInterval ( )
inlineprotected
705 {
706 for ( int i = 0; i < m_Body.Count(); i++ )
707 {
708 if ( m_Body.Get( i ) )
709 m_Body.Get( i ).UpdateInterval();
710 }
711
713 }
void CheckHeaderDragability()

Перекрестные ссылки Container::CheckHeaderDragability().

◆ UpdateRadialIcon()

void UpdateRadialIcon ( )
inlineprotected
98 {
99 if ( m_SlotIcon )
100 {
101 m_SlotIcon.GetRadialIconPanel().Show( false );
102 }
103 }
Widget GetRadialIconPanel()
Definition SlotsIcon.c:300

Перекрестные ссылки SlotsIcon::GetRadialIconPanel().

◆ UpdateSelectionIcons()

override void UpdateSelectionIcons ( )
inlineprotected
1361 {
1362 m_Parent.UpdateSelectionIcons();
1363 }
Widget m_Parent
Definition SizeToChild.c:92

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

◆ UpdateSpacer()

void UpdateSpacer ( )
protected

Поля

◆ ITEMS_IN_ROW

const int ITEMS_IN_ROW = 8
protected

◆ m_ActiveIndex

int m_ActiveIndex = 0
protected

◆ m_Body

ref array<ref LayoutHolder> m_Body
protected

◆ m_Closed

bool m_Closed
protected

◆ m_ColumnCount

int m_ColumnCount
protected

◆ m_Entity

EntityAI m_Entity
protected

◆ m_FocusedColumn

int m_FocusedColumn = 0
protected

◆ m_FocusedContainer

Container m_FocusedContainer
protected

◆ m_ForcedHide

bool m_ForcedHide
protected

◆ m_ForcedShow

bool m_ForcedShow
protected

◆ m_LastIndex

bool m_LastIndex
protected

◆ m_OpenedContainers

ref array<LayoutHolder> m_OpenedContainers
protected

◆ m_PrevAlpha

float m_PrevAlpha
protected

◆ m_SlotIcon

SlotsIcon m_SlotIcon
protected

◆ SORT_ATTACHMENTS_NEXT_OFFSET

const int SORT_ATTACHMENTS_NEXT_OFFSET = 2
protected

◆ SORT_ATTACHMENTS_OWN

const int SORT_ATTACHMENTS_OWN = 1
protected

◆ SORT_CARGO_NEXT_OFFSET

const int SORT_CARGO_NEXT_OFFSET = 3
protected

◆ SORT_CARGO_OWN

const int SORT_CARGO_OWN = 2
protected

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