DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ Refresh() [9/9]

override void UIScriptedMenu::Refresh ( )
inlineprivate

См. определение в файле SceneEditorMenu.c строка 944

945 {
947
948 string class_name = "n/a";
949 string pos_x = "n/a";
950 string pos_y = "n/a";
951 string pos_z = "n/a";
952 string rot = "n/a";
953 string hlt = "n/a";
954
955 // Clear attachments
956 for ( int i = 0; i < m_PrWidgetsAttachments.Count(); ++i )
957 {
958 m_PrWidgetsAttachments.Get(i).Hide();
959 }
960
961 if ( m_ModuleSceneManager.GetSelectedSceneObject() )
962 {
963 SceneObject obj = m_ModuleSceneManager.GetSelectedSceneObject();
964 vector v = obj.GetPosition();
965
966 class_name = obj.GetTypeName();
967 pos_x = v[0].ToString();
968 pos_y = v[1].ToString();
969 pos_z = v[2].ToString();
970 rot = obj.GetRotation().ToString();
971 hlt = obj.GetHealth().ToString();
972
973 ref TStringArray attachments_slots = obj.GetConfigAttachments();
974
975 float prop_h = 0.03;
976 float prop_count = attachments_slots.Count();
977 float prop_root_h = prop_h * (prop_count + 1);
978 float line_h = 1.0 / (prop_count + 1);
979
980 m_PrWgtAttRoot.SetSize(1, prop_root_h);
981 m_PrWgtAttTitle.SetSize(1, line_h);
982
983
984 EntityAI e = m_ModuleSceneManager.GetSelectedSceneObject().GetObject();
985
986 map<string, ref TStringArray> attachments_in_slots = GetItemNamesForSlots(attachments_slots);
987
988
989 for ( int j = 0; j < attachments_in_slots.Count(); ++j )
990 {
991 TStringArray attachments_in_slot = attachments_in_slots.GetElement(j);
992
993 UIPropertyAttachment ui_prop = GetFreeUIPropertyAttchament();
994
995 ui_prop.Show(m_ModuleSceneManager.GetSelectedSceneObject().GetObject(), attachments_in_slots.GetKey(j), attachments_in_slot);
996 ui_prop.SetPos( 0, (1 + j) * line_h );
997 ui_prop.SetSize( 1, line_h );
998 }
999
1000 m_WgtBtnEditInitScript.Enable( true );
1001 }
1002 else
1003 {
1004 m_WgtBtnEditInitScript.Enable( false );
1005 }
1006
1008 m_PrWgtPoxX.SetText(pos_x);
1009 m_PrWgtPoxY.SetText(pos_y);
1010 m_PrWgtPoxZ.SetText(pos_z);
1011 m_PrWgtDir.SetText(rot);
1012 m_PrWgtDmg.SetText(hlt);
1013
1014 m_SlWgtLoadedScene.SetText("Loaded Scene: "+m_ModuleSceneManager.SceneGetName());
1015
1016 //Ruler
1017 if ( m_ModuleSceneManager.IsRulerActivated() )
1018 {
1019 m_WgtBtnDeleteRuler.SetColor( 0xFF5DE028 );
1020 }
1021 else
1022 {
1023 m_WgtBtnDeleteRuler.SetColor( 0xFFFFFFFF );
1024 }
1025
1026 }
class LogManager EntityAI
map
Определения ControlsXboxNew.c:4
class OptionSelectorMultistate extends OptionSelector class_name
float GetHealth()
Определения SceneObject.c:433
TStringArray GetConfigAttachments()
Определения SceneObject.c:585
string GetTypeName()
Определения SceneObject.c:375
float GetRotation()
Определения SceneObject.c:490
vector GetPosition()
Определения SceneObject.c:423
void SetSize(float width, float height)
Определения UIPropertyAttachment.c:64
void Show(EntityAI e, string slot_name, TStringArray att_items)
Определения UIPropertyAttachment.c:69
void SetPos(float x, float y)
Определения UIPropertyAttachment.c:59
EditBoxWidget m_PrWgtPoxX
Определения SceneEditorMenu.c:1086
UIPropertyAttachment GetFreeUIPropertyAttchament()
Определения SceneEditorMenu.c:1314
void UpdateListObjects()
Определения SceneEditorMenu.c:1137
ButtonWidget m_WgtBtnEditInitScript
Определения SceneEditorMenu.c:1091
ref array< ref UIPropertyAttachment > m_PrWidgetsAttachments
Определения SceneEditorMenu.c:1095
EditBoxWidget m_PrWgtDir
Определения SceneEditorMenu.c:1089
EditBoxWidget m_PrWgtPoxY
Определения SceneEditorMenu.c:1087
Widget m_PrWgtAttTitle
Определения SceneEditorMenu.c:1093
EditBoxWidget m_PrWgtDmg
Определения SceneEditorMenu.c:1090
Widget m_PrWgtAttRoot
Определения SceneEditorMenu.c:1092
PluginSceneManager m_ModuleSceneManager
Определения SceneEditorMenu.c:1050
EditBoxWidget m_PrWgtPoxZ
Определения SceneEditorMenu.c:1088
TextWidget m_PrWgtClassName
Определения SceneEditorMenu.c:1085
TextWidget m_SlWgtLoadedScene
Определения SceneEditorMenu.c:1069
ButtonWidget m_WgtBtnDeleteRuler
Определения SceneEditorMenu.c:1060
map< string, ref TStringArray > GetItemNamesForSlots(TStringArray slots)
Определения SceneEditorMenu.c:1335
proto string ToString(bool simple=true)
proto string ToString(bool beautify=true)
Vector to string.
array< string > TStringArray
Определения EnScript.c:685

Перекрестные ссылки class_name, SceneObject::GetConfigAttachments(), GetFreeUIPropertyAttchament(), SceneObject::GetHealth(), GetItemNamesForSlots(), SceneObject::GetPosition(), SceneObject::GetRotation(), SceneObject::GetTypeName(), m_ModuleSceneManager, m_PrWgtAttRoot, m_PrWgtAttTitle, m_PrWgtClassName, m_PrWgtDir, m_PrWgtDmg, m_PrWgtPoxX, m_PrWgtPoxY, m_PrWgtPoxZ, m_PrWidgetsAttachments, m_SlWgtLoadedScene, m_WgtBtnDeleteRuler, m_WgtBtnEditInitScript, UIPropertyAttachment::SetPos(), UIPropertyAttachment::SetSize(), UIPropertyAttachment::Show(), float::ToString(), vector::ToString() и UpdateListObjects().