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

Protected Member Functions

void CargoContainerRow (LayoutHolder parent)
 
void UnfocusAll ()
 
void SetFocus (int column)
 
bool GetIconSize (int row, int column, out int width, out int height)
 
int GetFocusedColumn ()
 
override void SetLayoutName ()
 
void SetEntity (EntityAI entity)
 
void DropReceived (Widget w, int x, int y, Widget receiver)
 
void DraggingOver (Widget w, int x, int y, Widget receiver)
 
void ColumnOnDraggingOver0 (Widget w)
 !-—
 
void ColumnOnDraggingOver1 (Widget w)
 
void ColumnOnDraggingOver2 (Widget w)
 
void ColumnOnDraggingOver3 (Widget w)
 
void ColumnOnDraggingOver4 (Widget w)
 
void ColumnOnDraggingOver5 (Widget w)
 
void ColumnOnDraggingOver6 (Widget w)
 
void ColumnOnDraggingOver7 (Widget w)
 
void ColumnOnDraggingOver8 (Widget w)
 
void ColumnOnDraggingOver9 (Widget w)
 
void Column0 (Widget w)
 
void Column1 (Widget w)
 
void Column2 (Widget w)
 
void Column3 (Widget w)
 
void Column4 (Widget w)
 
void Column5 (Widget w)
 
void Column6 (Widget w)
 
void Column7 (Widget w)
 
void Column8 (Widget w)
 
void Column9 (Widget w)
 
override void OnShow ()
 !-—
 
override void OnHide ()
 
void SetNumber (int number)
 
int GetWidth ()
 
void SetWidth (int width, bool immedUpdate=true)
 

Protected Attributes

int m_NumberRow
 
int m_NumberColumnFocused
 
int m_Width
 
int m_MaxColumns
 
EntityAI m_Entity
 
CargoContainer m_ParentContainer
 
ref SizeToChild m_Resizer1
 
ref SizeToParent m_Resizer2
 

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 CargoContainerRow.c.

Constructor & Destructor Documentation

◆ CargoContainerRow()

void CargoContainerRow::CargoContainerRow ( LayoutHolder parent)
inlineprotected

Definition at line 14 of file CargoContainerRow.c.

15 {
16 m_ParentContainer = CargoContainer.Cast(parent);
17#ifdef PLATFORM_CONSOLE
18 m_MaxColumns = 5;
19#else
20 m_MaxColumns = 10;
21#endif
22
23 for (int i = 0; i < m_MaxColumns; i++)
24 {
25 Widget iconWidget = GetMainWidget().FindAnyWidget("Icon" + i);
26
27 iconWidget.SetUserID(i);
28
29 WidgetEventHandler.GetInstance().RegisterOnDropReceived(iconWidget, this, "DropReceived");
30 WidgetEventHandler.GetInstance().RegisterOnDraggingOver(iconWidget, this, "DraggingOver");
31 }
32
33 m_RootWidget.GetScript(m_Resizer1);
34 m_RootWidget.FindAnyWidget("SpacerTop").GetScript(m_Resizer2);
35 }
ref Widget m_RootWidget[MAX_SIMULTANIOUS_PLAYERS]
ref SizeToChild m_Resizer1
ref SizeToParent m_Resizer2
CargoContainer m_ParentContainer
static WidgetEventHandler GetInstance()

References WidgetEventHandler::GetInstance(), m_MaxColumns, m_ParentContainer, m_Resizer1, m_Resizer2, and m_RootWidget.

Member Function Documentation

◆ Column0()

void CargoContainerRow::Column0 ( Widget w)
inlineprotected

Definition at line 310 of file CargoContainerRow.c.

311 {
312 if (m_Parent.m_Parent.IsInherited(ContainerWithCargo))
313 (ContainerWithCargo.Cast(m_Parent.m_Parent)).DropReceived(w, m_NumberRow, 0);
314 else if (m_Parent.m_Parent.IsInherited(ContainerWithCargoAndAttachments))
315 (ContainerWithCargoAndAttachments.Cast(m_Parent.m_Parent)).DropReceived(w, m_NumberRow, 0, m_ParentContainer);
316 else if (m_Parent.m_Parent.IsInherited(HandsContainer))
318 else if (m_Parent.m_Parent.IsInherited(AttachmentCategoriesRow))
320 }
Widget m_Parent
Definition SizeToChild.c:86
void DropReceived(Widget w, int x, int y, Widget receiver)

References DropReceived(), m_NumberRow, m_Parent, and m_ParentContainer.

◆ Column1()

void CargoContainerRow::Column1 ( Widget w)
inlineprotected

Definition at line 322 of file CargoContainerRow.c.

323 {
324 if (m_Parent.m_Parent.IsInherited(ContainerWithCargo))
325 (ContainerWithCargo.Cast(m_Parent.m_Parent)).DropReceived(w, m_NumberRow, 1);
326 else if (m_Parent.m_Parent.IsInherited(ContainerWithCargoAndAttachments))
327 (ContainerWithCargoAndAttachments.Cast(m_Parent.m_Parent)).DropReceived(w, m_NumberRow, 1, m_ParentContainer);
328 else if (m_Parent.m_Parent.IsInherited(HandsContainer))
330 else if (m_Parent.m_Parent.IsInherited(AttachmentCategoriesRow))
332 }

References DropReceived(), m_NumberRow, m_Parent, and m_ParentContainer.

◆ Column2()

void CargoContainerRow::Column2 ( Widget w)
inlineprotected

Definition at line 334 of file CargoContainerRow.c.

335 {
336 if (m_Parent.m_Parent.IsInherited(ContainerWithCargo))
337 (ContainerWithCargo.Cast(m_Parent.m_Parent)).DropReceived(w, m_NumberRow, 2);
338 else if (m_Parent.m_Parent.IsInherited(ContainerWithCargoAndAttachments))
339 (ContainerWithCargoAndAttachments.Cast(m_Parent.m_Parent)).DropReceived(w, m_NumberRow, 2, m_ParentContainer);
340 else if (m_Parent.m_Parent.IsInherited(HandsContainer))
342 else if (m_Parent.m_Parent.IsInherited(AttachmentCategoriesRow))
344 }

References DropReceived(), m_NumberRow, m_Parent, and m_ParentContainer.

◆ Column3()

void CargoContainerRow::Column3 ( Widget w)
inlineprotected

Definition at line 346 of file CargoContainerRow.c.

347 {
348 if (m_Parent.m_Parent.IsInherited(ContainerWithCargo))
349 (ContainerWithCargo.Cast(m_Parent.m_Parent)).DropReceived(w, m_NumberRow, 3);
350 else if (m_Parent.m_Parent.IsInherited(ContainerWithCargoAndAttachments))
351 (ContainerWithCargoAndAttachments.Cast(m_Parent.m_Parent)).DropReceived(w, m_NumberRow, 3, m_ParentContainer);
352 else if (m_Parent.m_Parent.IsInherited(HandsContainer))
354 else if (m_Parent.m_Parent.IsInherited(AttachmentCategoriesRow))
356 }

References DropReceived(), m_NumberRow, m_Parent, and m_ParentContainer.

◆ Column4()

void CargoContainerRow::Column4 ( Widget w)
inlineprotected

Definition at line 358 of file CargoContainerRow.c.

359 {
360 if (m_Parent.m_Parent.IsInherited(ContainerWithCargo))
361 (ContainerWithCargo.Cast(m_Parent.m_Parent)).DropReceived(w, m_NumberRow, 4);
362 else if (m_Parent.m_Parent.IsInherited(ContainerWithCargoAndAttachments))
363 (ContainerWithCargoAndAttachments.Cast(m_Parent.m_Parent)).DropReceived(w, m_NumberRow, 4, m_ParentContainer);
364 else if (m_Parent.m_Parent.IsInherited(HandsContainer))
366 else if (m_Parent.m_Parent.IsInherited(AttachmentCategoriesRow))
368 }

References DropReceived(), m_NumberRow, m_Parent, and m_ParentContainer.

◆ Column5()

void CargoContainerRow::Column5 ( Widget w)
inlineprotected

Definition at line 370 of file CargoContainerRow.c.

371 {
372 if (m_Parent.m_Parent.IsInherited(ContainerWithCargo))
373 (ContainerWithCargo.Cast(m_Parent.m_Parent)).DropReceived(w, m_NumberRow, 5);
374 else if (m_Parent.m_Parent.IsInherited(ContainerWithCargoAndAttachments))
375 (ContainerWithCargoAndAttachments.Cast(m_Parent.m_Parent)).DropReceived(w, m_NumberRow, 5, m_ParentContainer);
376 else if (m_Parent.m_Parent.IsInherited(HandsContainer))
378 else if (m_Parent.m_Parent.IsInherited(AttachmentCategoriesRow))
380 }

References DropReceived(), m_NumberRow, m_Parent, and m_ParentContainer.

◆ Column6()

void CargoContainerRow::Column6 ( Widget w)
inlineprotected

Definition at line 382 of file CargoContainerRow.c.

383 {
384 if (m_Parent.m_Parent.IsInherited(ContainerWithCargo))
385 (ContainerWithCargo.Cast(m_Parent.m_Parent)).DropReceived(w, m_NumberRow, 6);
386 else if (m_Parent.m_Parent.IsInherited(ContainerWithCargoAndAttachments))
387 (ContainerWithCargoAndAttachments.Cast(m_Parent.m_Parent)).DropReceived(w, m_NumberRow, 6, m_ParentContainer);
388 else if (m_Parent.m_Parent.IsInherited(HandsContainer))
390 else if (m_Parent.m_Parent.IsInherited(AttachmentCategoriesRow))
392 }

References DropReceived(), m_NumberRow, m_Parent, and m_ParentContainer.

◆ Column7()

void CargoContainerRow::Column7 ( Widget w)
inlineprotected

Definition at line 394 of file CargoContainerRow.c.

395 {
396 if (m_Parent.m_Parent.IsInherited(ContainerWithCargo))
397 (ContainerWithCargo.Cast(m_Parent.m_Parent)).DropReceived(w, m_NumberRow, 7);
398 else if (m_Parent.m_Parent.IsInherited(ContainerWithCargoAndAttachments))
399 (ContainerWithCargoAndAttachments.Cast(m_Parent.m_Parent)).DropReceived(w, m_NumberRow, 7, m_ParentContainer);
400 else if (m_Parent.m_Parent.IsInherited(HandsContainer))
402 else if (m_Parent.m_Parent.IsInherited(AttachmentCategoriesRow))
404 }

References DropReceived(), m_NumberRow, m_Parent, and m_ParentContainer.

◆ Column8()

void CargoContainerRow::Column8 ( Widget w)
inlineprotected

Definition at line 406 of file CargoContainerRow.c.

407 {
408 if (m_Parent.m_Parent.IsInherited(ContainerWithCargo))
409 (ContainerWithCargo.Cast(m_Parent.m_Parent)).DropReceived(w, m_NumberRow, 8);
410 else if (m_Parent.m_Parent.IsInherited(ContainerWithCargoAndAttachments))
411 (ContainerWithCargoAndAttachments.Cast(m_Parent.m_Parent)).DropReceived(w, m_NumberRow, 8, m_ParentContainer);
412 else if (m_Parent.m_Parent.IsInherited(HandsContainer))
414 else if (m_Parent.m_Parent.IsInherited(AttachmentCategoriesRow))
416 }

References DropReceived(), m_NumberRow, m_Parent, and m_ParentContainer.

◆ Column9()

void CargoContainerRow::Column9 ( Widget w)
inlineprotected

Definition at line 418 of file CargoContainerRow.c.

419 {
420 if (m_Parent.m_Parent.IsInherited(ContainerWithCargo))
421 (ContainerWithCargo.Cast(m_Parent.m_Parent)).DropReceived(w, m_NumberRow, 9);
422 else if (m_Parent.m_Parent.IsInherited(ContainerWithCargoAndAttachments))
423 (ContainerWithCargoAndAttachments.Cast(m_Parent.m_Parent)).DropReceived(w, m_NumberRow, 9, m_ParentContainer);
424 else if (m_Parent.m_Parent.IsInherited(HandsContainer))
426 else if (m_Parent.m_Parent.IsInherited(AttachmentCategoriesRow))
428 }

References DropReceived(), m_NumberRow, m_Parent, and m_ParentContainer.

◆ ColumnOnDraggingOver0()

void CargoContainerRow::ColumnOnDraggingOver0 ( Widget w)
inlineprotected

!-—

Definition at line 190 of file CargoContainerRow.c.

191 {
192 if (m_Parent.m_Parent.IsInherited(ContainerWithCargo))
193 ContainerWithCargo.Cast(m_Parent.m_Parent).DraggingOverGrid(w, m_NumberRow, 0, null);
194 else if (m_Parent.m_Parent.IsInherited(ContainerWithCargoAndAttachments))
195 ContainerWithCargoAndAttachments.Cast(m_Parent.m_Parent).DraggingOverGrid(w, m_NumberRow, 0, null, m_ParentContainer);
196 else if (m_Parent.m_Parent.IsInherited(HandsContainer))
197 (HandsContainer.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 0, null, m_ParentContainer);
198 else if (m_Parent.m_Parent.IsInherited(AttachmentCategoriesRow))
199 (AttachmentCategoriesRow.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 0, null, m_ParentContainer);
200 }

References m_NumberRow, m_Parent, and m_ParentContainer.

◆ ColumnOnDraggingOver1()

void CargoContainerRow::ColumnOnDraggingOver1 ( Widget w)
inlineprotected

Definition at line 202 of file CargoContainerRow.c.

203 {
204 if (m_Parent.m_Parent.IsInherited(ContainerWithCargo))
205 ContainerWithCargo.Cast(m_Parent.m_Parent).DraggingOverGrid(w, m_NumberRow, 1, null);
206 else if (m_Parent.m_Parent.IsInherited(ContainerWithCargoAndAttachments))
207 (ContainerWithCargoAndAttachments.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 1, null, m_ParentContainer);
208 else if (m_Parent.m_Parent.IsInherited(HandsContainer))
209 (HandsContainer.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 1, null, m_ParentContainer);
210 else if (m_Parent.m_Parent.IsInherited(AttachmentCategoriesRow))
211 (AttachmentCategoriesRow.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 1, null, m_ParentContainer);
212 }

References m_NumberRow, m_Parent, and m_ParentContainer.

◆ ColumnOnDraggingOver2()

void CargoContainerRow::ColumnOnDraggingOver2 ( Widget w)
inlineprotected

Definition at line 214 of file CargoContainerRow.c.

215 {
216 if (m_Parent.m_Parent.IsInherited(ContainerWithCargo))
217 ContainerWithCargo.Cast(m_Parent.m_Parent).DraggingOverGrid(w, m_NumberRow, 2, null);
218 else if (m_Parent.m_Parent.IsInherited(ContainerWithCargoAndAttachments))
219 ContainerWithCargoAndAttachments.Cast(m_Parent.m_Parent).DraggingOverGrid(w, m_NumberRow, 2, null, m_ParentContainer);
220 else if (m_Parent.m_Parent.IsInherited(HandsContainer))
221 (HandsContainer.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 2, null, m_ParentContainer);
222 else if (m_Parent.m_Parent.IsInherited(AttachmentCategoriesRow))
223 (AttachmentCategoriesRow.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 2, null, m_ParentContainer);
224 }

References m_NumberRow, m_Parent, and m_ParentContainer.

◆ ColumnOnDraggingOver3()

void CargoContainerRow::ColumnOnDraggingOver3 ( Widget w)
inlineprotected

Definition at line 226 of file CargoContainerRow.c.

227 {
228 if (m_Parent.m_Parent.IsInherited(ContainerWithCargo))
229 ContainerWithCargo.Cast(m_Parent.m_Parent).DraggingOverGrid(w, m_NumberRow, 3, null);
230 else if (m_Parent.m_Parent.IsInherited(ContainerWithCargoAndAttachments))
231 (ContainerWithCargoAndAttachments.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 3, null, m_ParentContainer);
232 else if (m_Parent.m_Parent.IsInherited(HandsContainer))
233 (HandsContainer.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 3, null, m_ParentContainer);
234 else if (m_Parent.m_Parent.IsInherited(AttachmentCategoriesRow))
235 (AttachmentCategoriesRow.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 3, null, m_ParentContainer);
236 }

References m_NumberRow, m_Parent, and m_ParentContainer.

◆ ColumnOnDraggingOver4()

void CargoContainerRow::ColumnOnDraggingOver4 ( Widget w)
inlineprotected

Definition at line 238 of file CargoContainerRow.c.

239 {
240 if (m_Parent.m_Parent.IsInherited(ContainerWithCargo))
241 ContainerWithCargo.Cast(m_Parent.m_Parent).DraggingOverGrid(w, m_NumberRow, 4, null);
242 else if (m_Parent.m_Parent.IsInherited(ContainerWithCargoAndAttachments))
243 (ContainerWithCargoAndAttachments.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 4, null, m_ParentContainer);
244 else if (m_Parent.m_Parent.IsInherited(HandsContainer))
245 (HandsContainer.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 4, null, m_ParentContainer);
246 else if (m_Parent.m_Parent.IsInherited(AttachmentCategoriesRow))
247 (AttachmentCategoriesRow.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 4, null, m_ParentContainer);
248 }

References m_NumberRow, m_Parent, and m_ParentContainer.

◆ ColumnOnDraggingOver5()

void CargoContainerRow::ColumnOnDraggingOver5 ( Widget w)
inlineprotected

Definition at line 250 of file CargoContainerRow.c.

251 {
252 if (m_Parent.m_Parent.IsInherited(ContainerWithCargo))
253 ContainerWithCargo.Cast(m_Parent.m_Parent).DraggingOverGrid(w, m_NumberRow, 5, null);
254 else if (m_Parent.m_Parent.IsInherited(ContainerWithCargoAndAttachments))
255 (ContainerWithCargoAndAttachments.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 5, null, m_ParentContainer);
256 else if (m_Parent.m_Parent.IsInherited(HandsContainer))
257 (HandsContainer.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 5, null, m_ParentContainer);
258 else if (m_Parent.m_Parent.IsInherited(AttachmentCategoriesRow))
259 (AttachmentCategoriesRow.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 5, null, m_ParentContainer);
260 }

References m_NumberRow, m_Parent, and m_ParentContainer.

◆ ColumnOnDraggingOver6()

void CargoContainerRow::ColumnOnDraggingOver6 ( Widget w)
inlineprotected

Definition at line 262 of file CargoContainerRow.c.

263 {
264 if (m_Parent.m_Parent.IsInherited(ContainerWithCargo))
265 ContainerWithCargo.Cast(m_Parent.m_Parent).DraggingOverGrid(w, m_NumberRow, 6, null);
266 else if (m_Parent.m_Parent.IsInherited(ContainerWithCargoAndAttachments))
267 (ContainerWithCargoAndAttachments.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 6, null, m_ParentContainer);
268 else if (m_Parent.m_Parent.IsInherited(HandsContainer))
269 (HandsContainer.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 6, null, m_ParentContainer);
270 else if (m_Parent.m_Parent.IsInherited(AttachmentCategoriesRow))
271 (AttachmentCategoriesRow.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 6, null, m_ParentContainer);
272 }

References m_NumberRow, m_Parent, and m_ParentContainer.

◆ ColumnOnDraggingOver7()

void CargoContainerRow::ColumnOnDraggingOver7 ( Widget w)
inlineprotected

Definition at line 274 of file CargoContainerRow.c.

275 {
276 if (m_Parent.m_Parent.IsInherited(ContainerWithCargo))
277 ContainerWithCargo.Cast(m_Parent.m_Parent).DraggingOverGrid(w, m_NumberRow, 7, null);
278 else if (m_Parent.m_Parent.IsInherited(ContainerWithCargoAndAttachments))
279 (ContainerWithCargoAndAttachments.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 7, null, m_ParentContainer);
280 else if (m_Parent.m_Parent.IsInherited(HandsContainer))
281 (HandsContainer.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 7, null, m_ParentContainer);
282 else if (m_Parent.m_Parent.IsInherited(AttachmentCategoriesRow))
283 (AttachmentCategoriesRow.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 7, null, m_ParentContainer);
284 }

References m_NumberRow, m_Parent, and m_ParentContainer.

◆ ColumnOnDraggingOver8()

void CargoContainerRow::ColumnOnDraggingOver8 ( Widget w)
inlineprotected

Definition at line 286 of file CargoContainerRow.c.

287 {
288 if (m_Parent.m_Parent.IsInherited(ContainerWithCargo))
289 ContainerWithCargo.Cast(m_Parent.m_Parent).DraggingOverGrid(w, m_NumberRow, 8, null);
290 else if (m_Parent.m_Parent.IsInherited(ContainerWithCargoAndAttachments))
291 (ContainerWithCargoAndAttachments.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 8, null, m_ParentContainer);
292 else if (m_Parent.m_Parent.IsInherited(HandsContainer))
293 (HandsContainer.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 8, null, m_ParentContainer);
294 else if (m_Parent.m_Parent.IsInherited(AttachmentCategoriesRow))
295 (AttachmentCategoriesRow.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 8, null, m_ParentContainer);
296 }

References m_NumberRow, m_Parent, and m_ParentContainer.

◆ ColumnOnDraggingOver9()

void CargoContainerRow::ColumnOnDraggingOver9 ( Widget w)
inlineprotected

Definition at line 298 of file CargoContainerRow.c.

299 {
300 if (m_Parent.m_Parent.IsInherited(ContainerWithCargo))
301 ContainerWithCargo.Cast(m_Parent.m_Parent).DraggingOverGrid(w, m_NumberRow, 9, null);
302 else if (m_Parent.m_Parent.IsInherited(ContainerWithCargoAndAttachments))
303 (ContainerWithCargoAndAttachments.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 9, null, m_ParentContainer);
304 else if (m_Parent.m_Parent.IsInherited(HandsContainer))
305 (HandsContainer.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 9, null, m_ParentContainer);
306 else if (m_Parent.m_Parent.IsInherited(AttachmentCategoriesRow))
307 (AttachmentCategoriesRow.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, 9, null, m_ParentContainer);
308 }

References m_NumberRow, m_Parent, and m_ParentContainer.

◆ DraggingOver()

void CargoContainerRow::DraggingOver ( Widget w,
int x,
int y,
Widget receiver )
inlineprotected

Definition at line 176 of file CargoContainerRow.c.

177 {
178 if (m_Parent.m_Parent.IsInherited(ContainerWithCargo))
179 ContainerWithCargo.Cast(m_Parent.m_Parent).DraggingOverGrid(w, m_NumberRow, receiver.GetUserID(), null);
180 else if (m_Parent.m_Parent.IsInherited(ContainerWithCargoAndAttachments))
181 ContainerWithCargoAndAttachments.Cast(m_Parent.m_Parent).DraggingOverGrid(w, m_NumberRow, receiver.GetUserID(), null, m_ParentContainer);
182 else if (m_Parent.m_Parent.IsInherited(HandsContainer))
183 (HandsContainer.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, receiver.GetUserID(), null, m_ParentContainer);
184 else if (m_Parent.m_Parent.IsInherited(AttachmentCategoriesRow))
185 (AttachmentCategoriesRow.Cast(m_Parent.m_Parent)).DraggingOverGrid(w, m_NumberRow, receiver.GetUserID(), null, m_ParentContainer);
186 }

References m_NumberRow, m_Parent, and m_ParentContainer.

◆ DropReceived()

void CargoContainerRow::DropReceived ( Widget w,
int x,
int y,
Widget receiver )
inlineprotected

Definition at line 164 of file CargoContainerRow.c.

165 {
166 if (m_Parent.m_Parent.IsInherited(ContainerWithCargo))
167 (ContainerWithCargo.Cast(m_Parent.m_Parent)).DropReceived(w, m_NumberRow, receiver.GetUserID());
168 else if (m_Parent.m_Parent.IsInherited(ContainerWithCargoAndAttachments))
169 (ContainerWithCargoAndAttachments.Cast(m_Parent.m_Parent)).DropReceived(w, m_NumberRow, receiver.GetUserID(), m_ParentContainer);
170 else if (m_Parent.m_Parent.IsInherited(HandsContainer))
172 else if (m_Parent.m_Parent.IsInherited(AttachmentCategoriesRow))
174 }

References DropReceived(), m_NumberRow, m_Parent, and m_ParentContainer.

Referenced by Column0(), Column1(), Column2(), Column3(), Column4(), Column5(), Column6(), Column7(), Column8(), Column9(), and DropReceived().

◆ GetFocusedColumn()

int CargoContainerRow::GetFocusedColumn ( )
inlineprotected

Definition at line 126 of file CargoContainerRow.c.

127 {
129 }

References m_NumberColumnFocused.

◆ GetIconSize()

bool CargoContainerRow::GetIconSize ( int row,
int column,
out int width,
out int height )
inlineprotected

Definition at line 97 of file CargoContainerRow.c.

98 {
99#ifdef PLATFORM_WINDOWS
100#ifndef PLATFORM_CONSOLE
101#ifndef SERVER_FOR_CONSOLE
102 CargoGrid grid = CargoGrid.Cast(m_Entity.GetInventory().GetCargo());
103 if (grid)
104 {
105 EntityAI focused_item_new = grid.FindEntityInCargoOn(row, column);
107 {
109
110 if (icon)
111 {
112 width = icon.GetSizeX();
113 height = icon.GetSizeY();
114
115 return true;
116 }
117 }
118 }
119#endif
120#endif
121#endif
122
123 return false;
124 }
Definition Icon.c:2

References m_Entity, and m_ParentContainer.

◆ GetWidth()

int CargoContainerRow::GetWidth ( )
inlineprotected

Definition at line 446 of file CargoContainerRow.c.

447 {
448 return m_Width;
449 }

References m_Width.

◆ OnHide()

override void CargoContainerRow::OnHide ( )
inlineprotected

Definition at line 436 of file CargoContainerRow.c.

437 {
438 GetRootWidget().Show(false);
439 }

◆ OnShow()

override void CargoContainerRow::OnShow ( )
inlineprotected

!-—

Definition at line 431 of file CargoContainerRow.c.

432 {
433 GetRootWidget().Show(true);
434 }

◆ SetEntity()

void CargoContainerRow::SetEntity ( EntityAI entity)
inlineprotected

Definition at line 159 of file CargoContainerRow.c.

160 {
162 }

References m_Entity.

◆ SetFocus()

void CargoContainerRow::SetFocus ( int column)
inlineprotected

Definition at line 68 of file CargoContainerRow.c.

69 {
71
72 //GetMainWidget().FindAnyWidget( "Cursor" + column ).Show( true );
73
74 // Show selector
75#ifdef PLATFORM_WINDOWS
76#ifndef PLATFORM_CONSOLE
77#ifndef SERVER_FOR_CONSOLE
78 CargoGrid grid = CargoGrid.Cast(m_Entity.GetInventory().GetCargo());
79 if (grid)
80 {
83 {
85
86 if (icon)
87 icon.SetActive(true);
88 }
89 else
90 GetMainWidget().FindAnyWidget("Cursor" + column).Show(true);
91 }
92#endif
93#endif
94#endif
95 }

References m_Entity, m_NumberColumnFocused, m_NumberRow, and m_ParentContainer.

◆ SetLayoutName()

override void CargoContainerRow::SetLayoutName ( )
inlineprotected

Definition at line 131 of file CargoContainerRow.c.

132 {
133#ifdef PLATFORM_CONSOLE
135#else
136 switch (InventoryMenu.GetWidthType())
137 {
138 case ScreenWidthType.NARROW:
139 {
141 break;
142 }
143 case ScreenWidthType.MEDIUM:
144 {
146 break;
147 }
148 case ScreenWidthType.WIDE:
149 {
151
152 break;
153 }
154 }
155#endif
156
157 }
ScreenWidthType
void InventoryMenu()
const string CargoContainerRowNarrow
const string CargoContainerRowMedium
const string CargoContainerRowWide
const string CargoContainerRowXbox

References WidgetLayoutName::CargoContainerRowMedium, WidgetLayoutName::CargoContainerRowNarrow, WidgetLayoutName::CargoContainerRowWide, WidgetLayoutName::CargoContainerRowXbox, and InventoryMenu().

◆ SetNumber()

void CargoContainerRow::SetNumber ( int number)
inlineprotected

Definition at line 441 of file CargoContainerRow.c.

442 {
444 }

References m_NumberRow.

◆ SetWidth()

void CargoContainerRow::SetWidth ( int width,
bool immedUpdate = true )
inlineprotected

Definition at line 451 of file CargoContainerRow.c.

452 {
453 m_Width = width;
454 int i;
455
456 for (i = width; i < m_MaxColumns; i++)
457 {
458 GetMainWidget().FindAnyWidget("Icon" + i).Show(false, false);
459 GetMainWidget().FindAnyWidget("Spacer" + i).Show(false, false);
460 }
461
462 GetMainWidget().FindAnyWidget("Spacer10").Show(m_Width != 0, false);
463
464 if (immedUpdate)
465 {
466 m_Resizer2.Refresh();
467 GetMainWidget().Update();
468 }
469
470 m_Resizer1.ResizeParentToChild();
471 }

References m_MaxColumns, m_Resizer1, m_Resizer2, and m_Width.

◆ UnfocusAll()

void CargoContainerRow::UnfocusAll ( )
inlineprotected

Definition at line 37 of file CargoContainerRow.c.

38 {
39 for (int i = 0; i < m_MaxColumns; i++)
40 {
41 //GetMainWidget().FindAnyWidget( "Cursor" + i ).Show( false );
42#ifdef PLATFORM_WINDOWS
43#ifndef PLATFORM_CONSOLE
44#ifndef SERVER_FOR_CONSOLE
45 CargoGrid grid = CargoGrid.Cast(m_Entity.GetInventory().GetCargo());
46 if (grid)
47 {
48
49 EntityAI entity = grid.FindEntityInCargoOn(m_NumberRow, i);
50 if (entity)
51 {
53
54 if (icon)
55 icon.SetActive(false);
56 }
57 else
58 GetMainWidget().FindAnyWidget("Cursor" + i).Show(false);
59 }
60#endif
61#endif
62#endif
63 }
64
66 }

References m_Entity, m_MaxColumns, m_NumberColumnFocused, m_NumberRow, and m_ParentContainer.

Member Data Documentation

◆ m_Entity

EntityAI CargoContainerRow::m_Entity
protected

Definition at line 8 of file CargoContainerRow.c.

Referenced by GetIconSize(), SetEntity(), SetFocus(), and UnfocusAll().

◆ m_MaxColumns

int CargoContainerRow::m_MaxColumns
protected

Definition at line 6 of file CargoContainerRow.c.

Referenced by CargoContainerRow(), SetWidth(), and UnfocusAll().

◆ m_NumberColumnFocused

int CargoContainerRow::m_NumberColumnFocused
protected

Definition at line 4 of file CargoContainerRow.c.

Referenced by GetFocusedColumn(), SetFocus(), and UnfocusAll().

◆ m_NumberRow

◆ m_ParentContainer

◆ m_Resizer1

ref SizeToChild CargoContainerRow::m_Resizer1
protected

Definition at line 11 of file CargoContainerRow.c.

Referenced by CargoContainerRow(), and SetWidth().

◆ m_Resizer2

ref SizeToParent CargoContainerRow::m_Resizer2
protected

Definition at line 12 of file CargoContainerRow.c.

Referenced by CargoContainerRow(), and SetWidth().

◆ m_Width

int CargoContainerRow::m_Width
protected

Definition at line 5 of file CargoContainerRow.c.

Referenced by GetWidth(), and SetWidth().


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