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

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

void PlayerPreview (LayoutHolder parent)
 
void RefreshPlayerPreview ()
 
void UpdateRotation (int mouse_x, int mouse_y, bool is_dragging)
 
void UpdateScale ()
 
bool MouseButtonDown (Widget w, int x, int y, int button)
 
bool MouseWheel (Widget w, int x, int y, int wheel)
 
override void UpdateInterval ()
 

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

ref PlayerPreviewWidget m_CharacterPanelWidget
 
int m_CharacterRotationX
 
int m_CharacterRotationY
 
int m_CharacterScaleDelta
 
vector m_CharacterOrientation
 
bool m_IsHolding
 

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

- Закрытые члены унаследованные от 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 ()
 
- Закрытые данные унаследованные от 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
 

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

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

◆ PlayerPreview()

void PlayerPreview ( LayoutHolder parent)
inlineprotected
12 {
13 m_CharacterPanelWidget = PlayerPreviewWidget.Cast( m_Parent.GetMainWidget().FindAnyWidget( "CharacterPanelWidget" ) );
14
15 WidgetEventHandler.GetInstance().RegisterOnMouseButtonDown( m_Parent.GetMainWidget().FindAnyWidget( "CharacterPanel" ), this, "MouseButtonDown" );
16 WidgetEventHandler.GetInstance().RegisterOnMouseWheel( m_Parent.GetMainWidget().FindAnyWidget( "CharacterPanel" ), this, "MouseWheel" );
17
20 m_CharacterPanelWidget.SetModelPosition( "0 0 0.605" );
21 m_CharacterPanelWidget.SetSize( 1.34, 1.34 ); // default scale
23 }
PlayerBase GetPlayer()
Definition ModifierBase.c:47
Widget m_Parent
Definition SizeToChild.c:92
void UpdateScale()
Definition PlayerPreview.c:46
ref PlayerPreviewWidget m_CharacterPanelWidget
Definition PlayerPreview.c:3
int m_CharacterScaleDelta
Definition PlayerPreview.c:7
Definition gameplay.c:300
Definition WidgetEventHandler.c:2
static WidgetEventHandler GetInstance()
Definition WidgetEventHandler.c:22
proto native CGame GetGame()

Перекрестные ссылки GetGame(), WidgetEventHandler::GetInstance(), GetPlayer(), m_CharacterPanelWidget, m_CharacterScaleDelta, m_Parent и UpdateScale().

Методы

◆ MouseButtonDown()

bool MouseButtonDown ( Widget w,
int x,
int y,
int button )
inlineprotected
70 {
72 m_IsHolding = true;
73 return true;
74 }
int m_CharacterRotationY
Definition PlayerPreview.c:6
int m_CharacterRotationX
Definition PlayerPreview.c:5
bool m_IsHolding
Definition PlayerPreview.c:9
proto void GetMousePos(out int x, out int y)

Перекрестные ссылки GetMousePos(), m_CharacterRotationX, m_CharacterRotationY и m_IsHolding.

◆ MouseWheel()

bool MouseWheel ( Widget w,
int x,
int y,
int wheel )
inlineprotected
77 {
80 return true;
81 }
Definition EntityAI.c:95

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

◆ RefreshPlayerPreview()

void RefreshPlayerPreview ( )
inlineprotected
26 {
27 m_CharacterPanelWidget.Refresh();
28 }

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

◆ UpdateInterval()

override void UpdateInterval ( )
inlineprotected
84 {
85 // item in hands update
86 m_CharacterPanelWidget.UpdateItemInHands(GetGame().GetPlayer().GetHumanInventory().GetEntityInHands());
87
90 if ( realPlayer && dummyPlayer )
91 {
92 // injury animation update
93 HumanCommandAdditives hca = dummyPlayer.GetCommandModifier_Additives();
94 //dummyPlayer.UpdateDummyPlayerProxyVisibility(realPlayer.FindAttachmentBySlotName("Shoulder"), realPlayer.FindAttachmentBySlotName("Melee"));
95 if ( hca && realPlayer.m_InjuryHandler )
96 hca.SetInjured(realPlayer.m_InjuryHandler.GetInjuryAnimValue(), realPlayer.m_InjuryHandler.IsInjuryAnimEnabled());
97 }
98
99 if ( m_IsHolding )
100 {
101 int mouse_x;
102 int mouse_y;
103
105
106 if ( GetMouseState(MouseState.LEFT) & 0x80000000 )
107 {
109 }
110 else
111 {
112 UpdateRotation( mouse_x, mouse_y, false );
113 m_IsHolding = false;
114 }
115 }
116 }
Definition DayZPlayerImplement.c:111
Definition PlayerBaseClient.c:2
void UpdateRotation(int mouse_x, int mouse_y, bool is_dragging)
Definition PlayerPreview.c:30
MouseState
Definition EnSystem.c:311
proto native int GetMouseState(MouseState index)
class HumanCommandWeapons HumanCommandAdditives()
Definition human.c:1099

Перекрестные ссылки GetGame(), GetMousePos(), GetMouseState(), GetPlayer(), HumanCommandAdditives(), m_CharacterPanelWidget, m_IsHolding и UpdateRotation().

◆ UpdateRotation()

void UpdateRotation ( int mouse_x,
int mouse_y,
bool is_dragging )
inlineprotected
31 {
33 {
36
37 m_CharacterPanelWidget.SetModelOrientation( orientation );
38
39 if ( !is_dragging )
40 {
42 }
43 }
44 }
vector m_CharacterOrientation
Definition PlayerPreview.c:8
Definition EnConvert.c:106

Перекрестные ссылки m_CharacterOrientation, m_CharacterPanelWidget и m_CharacterRotationX.

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

◆ UpdateScale()

void UpdateScale ( )
inlineprotected
47 {
49 {
50 float w, h;
51 m_CharacterPanelWidget.GetSize( w, h );
52 w = w + ( m_CharacterScaleDelta / 25 );
53 h = h + ( m_CharacterScaleDelta / 25 );
54 if ( w > 0.62 && w < 3 )
55 {
56 m_CharacterPanelWidget.SetSize( w, h );
57 }
58 else if ( w < 0.62 )
59 {
60 m_CharacterPanelWidget.SetSize( 0.62, 0.62 );
61 }
62 else if ( w > 3 )
63 {
64 m_CharacterPanelWidget.SetSize( 3, 3 );
65 }
66 }
67 }

Перекрестные ссылки m_CharacterPanelWidget и m_CharacterScaleDelta.

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

Поля

◆ m_CharacterOrientation

vector m_CharacterOrientation
protected

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

◆ m_CharacterPanelWidget

ref PlayerPreviewWidget m_CharacterPanelWidget
protected

◆ m_CharacterRotationX

int m_CharacterRotationX
protected

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

◆ m_CharacterRotationY

int m_CharacterRotationY
protected

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

◆ m_CharacterScaleDelta

int m_CharacterScaleDelta
protected

Используется в MouseWheel(), PlayerPreview() и UpdateScale().

◆ m_IsHolding

bool m_IsHolding
protected

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


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