DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
SceneEditorMenu.c
См. документацию.
1class SceneEditorMenu extends UIScriptedMenu
2{
3//---------------------------------------------------------------------------------
4// >> Public Scope
5 static const int POPUP_ID_SCENE_MANAGER = 0;
6 static const int POPUP_ID_SCENE_SETTINGS = 1;
7 static const int POPUP_ID_SCENE_NEW = 2;
8 static const int POPUP_ID_SCENE_RENAME = 3;
9 static const int POPUP_ID_SCENE_DELETE = 4;
10 static const int POPUP_ID_NOTIFY = 5;
11 static const int POPUP_ID_EDITOR_SETTINGS = 6;
12 static const int POPUP_ID_INIT_SCRIPT = 7;
13 static const int POPUP_ID_POSITION_MANAGER = 8;
14 static const int POPUP_ID_PRESET_NEW = 9;
15 static const int POPUP_ID_PRESET_RENAME = 10;
16 static const int POPUP_ID_CONFIGS = 11;
17 const string CONST_DEFAULT_PRESET_PREFIX = "[Default]";
18
19 // Render specific Preset Items
21 {
22 m_PresetsTextListbox.ClearItems();
23
24 int i;
25 TBoolArray preset_params;
26
27 // load fixed presets list
28 TStringArray presets_array = m_ConfigDebugProfileFixed.GetPresets();
29 for ( i = 0; i < presets_array.Count(); i++ )
30 {
31 m_PresetsTextListbox.AddItem( "["+presets_array.Get(i)+"]", new PresetParams ( presets_array.Get(i), true, false), 0);
32 }
33
34 // load custom presets list
35 TStringArray custom_presets_array = m_ConfigDebugProfile.GetPresets();
36 for ( i = 0; i < custom_presets_array.Count(); i++ )
37 {
38 m_PresetsTextListbox.AddItem( custom_presets_array.Get(i), new PresetParams ( custom_presets_array.Get(i),false, false), 0);
39 }
40
41 string default_preset = m_ConfigDebugProfile.GetDefaultPreset();
42 if ( default_preset != "" )
43 {
44 // if is fixed
45 int index = GetPresetIndexByName( default_preset );
46 if ( IsPresetFixed( default_preset) )
47 {
48 default_preset = "[" + default_preset + "]";
49 }
50 PresetParams preset_params_array;
51 if( index > -1 && index < m_PresetsTextListbox.GetNumItems() )
52 {
53 m_PresetsTextListbox.GetItemData( index, 0, preset_params_array );
54 m_PresetsTextListbox.SetItem( index, default_preset + CONST_DEFAULT_PRESET_PREFIX, preset_params_array, 0 );
55 }
56 }
57 }
58
59 bool IsPresetFixed( string preset_name )
60 {
61 int preset_index = GetPresetIndexByName( preset_name);
62 PresetParams item_params_array;
63 if ( preset_index > -1 && preset_index < m_PresetsTextListbox.GetNumItems() )
64 {
65 m_PresetsTextListbox.GetItemData( preset_index, 0, item_params_array );
66 return item_params_array.param2;
67 }
68 return false;
69 }
70
71 int GetPresetIndexByName( string preset_name )
72 {
73 int i;
74 for ( i = 0; i < m_PresetsTextListbox.GetNumItems(); i++ )
75 {
76 PresetParams item_params_array;
77 m_PresetsTextListbox.GetItemData( i, 0, item_params_array );
78
79 if ( item_params_array.param1 == preset_name )
80 {
81 return i;
82 }
83 }
84 return -1;
85 }
86
87 void NewPreset( string preset_name )
88 {
89 m_ConfigDebugProfile.PresetAdd( preset_name );
91 }
92
94 {
95 if ( GetCurrentPresetIndex() != -1 )
96 {
97 bool result = m_ConfigDebugProfile.PresetRemove( GetCurrentPresetName() );
99 }
100 }
101
102 void SetDefaultPreset( int preset_index )
103 {
104 // remove previous default parameter
105 string default_preset = m_ConfigDebugProfile.GetDefaultPreset();
106 if ( default_preset != "" )
107 {
108 int index = GetPresetIndexByName( default_preset );
109 // if is fixed
110 if ( IsPresetFixed( default_preset) )
111 {
112 default_preset = "[" + default_preset + "]";
113 }
114 PresetParams prev_preset_params_array;
115 if( index > -1 && index < m_PresetsTextListbox.GetNumItems() )
116 {
117 m_PresetsTextListbox.GetItemData( index, 0, prev_preset_params_array );
118 prev_preset_params_array.param3 = false; // remove DEFAULT
119 m_PresetsTextListbox.SetItem( index, default_preset, prev_preset_params_array, 0 );
120 }
121 }
122
123 // set preset on preset_index to default
124 // if is fixed
125 string preset_name = GetCurrentPresetName();
126 if ( IsPresetFixed( preset_name) )
127 {
128 preset_name = "[" + preset_name + "]";
129 }
130 // set new default preset
131 PresetParams preset_params_array;
132 index = GetCurrentPresetIndex();
133 if ( index > -1 && index < m_PresetsTextListbox.GetNumItems() )
134 {
135 m_PresetsTextListbox.GetItemData( index, 0, preset_params_array );
136 preset_params_array.param3 = true; // DEFAULT
137 m_PresetsTextListbox.SetItem( index, preset_name + CONST_DEFAULT_PRESET_PREFIX, preset_params_array, 0 );
138 }
139 // store preset
140 m_ConfigDebugProfile.SetDefaultPreset( GetCurrentPresetName() );
141 }
142
144 {
147 }
148
149 void RenamePreset( string new_preset_name )
150 {
151 if ( GetCurrentPresetIndex() != -1 )
152 {
153 bool result = m_ConfigDebugProfile.PresetRename( GetCurrentPresetName(), new_preset_name );
154 RefreshLists();
155 }
156 }
157
158 // Render specific Preset Items
160 {
161 // load preset items list
162 int i;
163 m_PresetItemsTextListbox.ClearItems();
164 if ( GetCurrentPresetIndex() != -1 )
165 {
166 bool isFixed = IsCurrentPresetFixed();
167 TStringArray preset_array = new TStringArray;
168
169 if ( isFixed )
170 {
171 m_ConfigDebugProfileFixed.GetPresetItems( GetCurrentPresetName(), preset_array );
172 }
173 else
174 {
175 m_ConfigDebugProfile.GetPresetItems( GetCurrentPresetName(), preset_array );
176 }
177
178 if ( preset_array )
179 {
180 for ( i = 0; i < preset_array.Count(); i++)
181 {
182 m_PresetItemsTextListbox.AddItem( preset_array.Get(i), NULL, 0);
183 }
184 }
185 }
186 }
187
189 {
190 int index = GetCurrentPresetIndex();
191 // load preset items list
192 if ( index > -1 && index < m_PresetsTextListbox.GetNumItems() )
193 {
194 PresetParams item_params_array;
195 m_PresetsTextListbox.GetItemData( index, 0, item_params_array );
196 return item_params_array.param1;
197 }
198 return "";
199 }
200
202 {
203 if ( GetCurrentItemIndex() != -1 )
204 {
205 string item_name;
206 m_PresetItemsTextListbox.GetItemText( GetCurrentItemIndex(), 0, item_name );
207 return item_name;
208 }
209 return "";
210 }
211
213 {
214 int selected_row_index = m_ClWgtLbxClassesList.GetSelectedRow();
215 if ( selected_row_index != -1 )
216 {
217 string item_name;
218 m_ClWgtLbxClassesList.GetItemText( selected_row_index, 0, item_name );
219 return item_name;
220 }
221 return "";
222 }
223
225 {
226 return m_PresetsTextListbox.GetSelectedRow();
227 }
228
230 {
231 return m_PresetItemsTextListbox.GetSelectedRow();
232 }
233
235 {
236 int index = GetCurrentPresetIndex();
237 if ( index > -1 && index < m_PresetsTextListbox.GetNumItems() )
238 {
239 PresetParams item_params_array;
240 m_PresetsTextListbox.GetItemData( index, 0, item_params_array );
241 return item_params_array.param2;
242 }
243 return -1;
244 }
245
247 {
248 int selected_row_index = m_ClWgtLbxClassesList.GetSelectedRow();
249 if ( selected_row_index != -1 && GetCurrentPresetIndex() != -1 )
250 {
251 string item_name;
252 m_ClWgtLbxClassesList.GetItemText( selected_row_index, 0, item_name );
253 m_ConfigDebugProfile.ItemAddToPreset( GetCurrentPresetName(), item_name);
255 }
256 }
257
259 {
260 if ( GetCurrentItemIndex() != -1 && GetCurrentPresetIndex() != -1 )
261 {
264 }
265 }
266
268 void SetPreset( bool clear_inventory, string preset_name)
269 {
270 int i;
271 if ( GetCurrentPresetIndex() != -1 )
272 {
273 bool is_preset_fixed = IsCurrentPresetFixed();
274 TStringArray preset_array = new TStringArray;
275
276 if ( is_preset_fixed )
277 {
278 m_ConfigDebugProfileFixed.GetPresetItems( preset_name, preset_array );
279 }
280 else
281 {
282 m_ConfigDebugProfile.GetPresetItems( preset_name, preset_array );
283 }
284
285 PlayerBase player = PlayerBase.Cast( g_Game.GetPlayer() );
286 if ( clear_inventory )
287 {
288 m_Developer.ClearInventory(player);
289 }
290
291 for ( i = 0; i < preset_array.Count(); i++)
292 {
293 float health = -1;
294 int quantity = -1;
295 if ( is_preset_fixed )
296 {
297 health = m_ConfigDebugProfileFixed.GetItemHealth( preset_name, i );
298 quantity = m_ConfigDebugProfileFixed.GetItemQuantity( preset_name, i );
299 }
300 else
301 {
302 health = m_ConfigDebugProfile.GetItemHealth( preset_name, i );
303 quantity = m_ConfigDebugProfile.GetItemQuantity( preset_name, i );
304 }
305
306 m_Developer.SpawnEntityInPlayerInventory(player, preset_array.Get(i), health, quantity);
307 }
308 }
309 }
310
312 {
313 int new_index = GetCurrentItemIndex() - 1;
314 if ( GetCurrentItemIndex() != -1 && GetCurrentPresetIndex() != -1 && new_index > -1)
315 {
318 m_PresetItemsTextListbox.SelectRow (new_index);
319 }
320 }
321
323 {
324 int new_index = GetCurrentItemIndex() + 1;
325 if ( GetCurrentItemIndex() != -1 && GetCurrentPresetIndex() != -1 && new_index < m_PresetItemsTextListbox.GetNumItems() )
326 {
329 m_PresetItemsTextListbox.SelectRow (new_index);
330 }
331 }
332
334 {
336 {
337 m_ConfigDebugProfile.SetSpawnDistance( m_SpawnDistanceEditBox.GetText().ToFloat() );
338 }
339 }
340
341 // Overrided Parent Functions
342 //============================================
343 // UseMouse (override)
344 //============================================
345 override bool UseMouse()
346 {
347 return true;
348 }
349
350 //============================================
351 // UseKeyboard (override)
352 //============================================
353 override bool UseKeyboard()
354 {
355 return true;
356 }
357
358 // System Events
359 //============================================
360 // SceneEditorMenu
361 //============================================
363 {
364 m_ModuleSceneManager = PluginSceneManager.Cast( GetPlugin(PluginSceneManager) );
365 m_ModuleSceneManager.OnUIEditorOpened();
366
371 }
372
373 //============================================
374 // ~SceneEditorMenu
375 //============================================
377 {
379
380 if ( IsModuleExist(PluginSceneManager) )
381 {
382 m_ModuleSceneManager.OnUIEditorClosed();
384 }
385
386 m_NotifyFadeTimer.Stop();
387 }
388
389 //============================================
390 // Init
391 //============================================
392 override Widget Init()
393 {
394 // Create Main layout menu
395 layoutRoot = g_Game.GetWorkspace().CreateWidgets("gui/layouts/scene_editor/day_z_scene_editor.layout");
396 m_WgtPnlWrapper = layoutRoot.FindAnyWidget("pnl_presets_wrapper_outer");
397 m_SlWgtLoadedScene = TextWidget.Cast( layoutRoot.FindAnyWidget("txt_left_label_loaded_scene") );
398 // Find ListTextBoxWidget for objects list
399 m_SlWgtLbxObjectsList = TextListboxWidget.Cast(layoutRoot.FindAnyWidget("txtlist_left_items") );
400 // Find Edit Box for shearching in object list
401 m_SlWgtEbxFilter = EditBoxWidget.Cast(layoutRoot.FindAnyWidget("edit_left_search_item") );
402 // Find Select Button for selecting in object list
403 m_SlWgtSelect = ButtonWidget.Cast(layoutRoot.FindAnyWidget("btn_left_select") );
404 m_SlWgtFocus = ButtonWidget.Cast(layoutRoot.FindAnyWidget("btn_left_focus") );
405 // Find Popup main panel
406 m_WgtPopupsMain = layoutRoot.FindAnyWidget("pnl_popups");
407 // Find Poups backgroudn
408 m_WgtPopupsBg = layoutRoot.FindAnyWidget("pnl_popup_bg");
409 // Find Edit Box for shearching in class list
410 m_ClWgtEbxFilter = EditBoxWidget.Cast(layoutRoot.FindAnyWidget("edit_left_search_class") );
411 // Find ListTextBoxWidget for class list
412 m_ClWgtLbxClassesList = TextListboxWidget.Cast(layoutRoot.FindAnyWidget("txtlist_left_classes") );
413 // Find Buttons
414 m_WgtBtnSceneManager = ButtonWidget.Cast(layoutRoot.FindAnyWidget("btn_top_scene_manager") );
415 m_WgtBtnPositionManager = ButtonWidget.Cast(layoutRoot.FindAnyWidget("btn_top_position_manager") );
416 m_WgtBtnSceneSettings = ButtonWidget.Cast(layoutRoot.FindAnyWidget("btn_top_settings") );
417 m_ClWgtButtonAddAtt = ButtonWidget.Cast(layoutRoot.FindAnyWidget("btn_left_cl_add_attachment") );
418 m_WgtBtnSceneSave = ButtonWidget.Cast(layoutRoot.FindAnyWidget("btn_top_save_scene") );
419 m_WgtBtnEditorSettings = ButtonWidget.Cast(layoutRoot.FindAnyWidget("btn_top_editor_settings") );
420 m_WgtBtnEditInitScript = ButtonWidget.Cast(layoutRoot.FindAnyWidget("btn_right_prop_pos_iscr_value") );
421 m_WgtBtnDeleteRuler = ButtonWidget.Cast(layoutRoot.FindAnyWidget("btn_delete_ruler") );
422 m_WgtBtnLeftPresets = ButtonWidget.Cast(layoutRoot.FindAnyWidget("btn_left_presets") );
423
424 // Find Widgets for properties
425 m_PrWgtClassName = TextWidget.Cast(layoutRoot.FindAnyWidget("txt_right_prop_class_value") );
426 m_PrWgtPoxX = EditBoxWidget.Cast(layoutRoot.FindAnyWidget("ebx_right_prop_pos_x_value") );
427 m_PrWgtPoxY = EditBoxWidget.Cast(layoutRoot.FindAnyWidget("ebx_right_prop_pos_y_value") );
428 m_PrWgtPoxZ = EditBoxWidget.Cast(layoutRoot.FindAnyWidget("ebx_right_prop_pos_z_value") );
429 m_PrWgtDir = EditBoxWidget.Cast(layoutRoot.FindAnyWidget("ebx_right_prop_pos_dir_value") );
430 m_PrWgtDmg = EditBoxWidget.Cast(layoutRoot.FindAnyWidget("ebx_right_prop_pos_hlt_value") );
431 m_PrWgtAttRoot = layoutRoot.FindAnyWidget("pnl_right_inspector_attachments");
432 m_PrWgtAttTitle = layoutRoot.FindAnyWidget("pnl_att_title");
434
435 // Notify
436 m_NotifyWgtPanel = layoutRoot.FindAnyWidget("pnl_notify");
437 m_NotifyWgtPanel.SetAlpha(0.0);
438 m_NotifyFadeTimer = new WidgetFadeTimer;
439
440 // Register Poups
441 m_Popups.Insert(POPUP_ID_SCENE_MANAGER, new UIPopupScriptSceneManager(layoutRoot.FindAnyWidget("pnl_popup_scene_manager")));
442 m_Popups.Insert(POPUP_ID_POSITION_MANAGER, new UIPopupScriptPositionManager(layoutRoot.FindAnyWidget("pnl_popup_position_manager")));
443 m_Popups.Insert(POPUP_ID_SCENE_SETTINGS, new UIPopupScriptSceneSettings(layoutRoot.FindAnyWidget("pnl_popup_settings")) );
444 m_Popups.Insert(POPUP_ID_SCENE_NEW, new UIPopupScriptSceneNew(layoutRoot.FindAnyWidget("pnl_popup_scene_new")) );
445 m_Popups.Insert(POPUP_ID_SCENE_RENAME, new UIPopupScriptSceneRename(layoutRoot.FindAnyWidget("pnl_popup_scene_rename")) );
446 m_Popups.Insert(POPUP_ID_SCENE_DELETE, new UIPopupScriptSceneDelete(layoutRoot.FindAnyWidget("pnl_popup_scene_delete")) );
447 m_Popups.Insert(POPUP_ID_NOTIFY, new UIPopupScriptNotify(layoutRoot.FindAnyWidget("pnl_popup_notify")) );
448 m_Popups.Insert(POPUP_ID_EDITOR_SETTINGS, new UIPopupScriptEditorSettings(layoutRoot.FindAnyWidget("pnl_popup_editor_settings")));
449 m_Popups.Insert(POPUP_ID_INIT_SCRIPT, new UIPopupScriptInitScript(layoutRoot.FindAnyWidget("pnl_popup_init_script")));
450 m_Popups.Insert(POPUP_ID_PRESET_NEW, new UIPopupScriptPresetNew(layoutRoot.FindAnyWidget("pnl_popup_preset_new")));
451 m_Popups.Insert(POPUP_ID_PRESET_RENAME, new UIPopupScriptPresetRename(layoutRoot.FindAnyWidget("pnl_popup_preset_rename")));
452 m_Popups.Insert(POPUP_ID_CONFIGS, new UIPopupScriptConfigs(layoutRoot.FindAnyWidget("pnl_popup_configs")));
453
454 m_PresetsTextListbox = TextListboxWidget.Cast( layoutRoot.FindAnyWidget("pnl_presets") );
455 m_PresetItemsTextListbox = TextListboxWidget.Cast( layoutRoot.FindAnyWidget("pnl_preset_items") );
456 m_ConfigDebugProfileFixed = PluginConfigDebugProfileFixed.Cast( GetPlugin(PluginConfigDebugProfileFixed) );
458 m_PresetAddItemtButton = ButtonWidget.Cast( layoutRoot.FindAnyWidget("btn_add_to_preset") );
459 m_PresetRemoveItemButton = ButtonWidget.Cast( layoutRoot.FindAnyWidget("btn_remove_from_preset") );
460 m_SpawnOnGroundButton = ButtonWidget.Cast( layoutRoot.FindAnyWidget("btn_spawn_on_ground") );
461 m_SpawnInInventoryButton = ButtonWidget.Cast( layoutRoot.FindAnyWidget("btn_spawn_in_inventory") );
462 m_SpawnAsAttachmentButton = ButtonWidget.Cast( layoutRoot.FindAnyWidget("btn_spawn_as_attachment") );
463 m_UpButton = ButtonWidget.Cast( layoutRoot.FindAnyWidget("btn_up") );
464 m_DownButton = ButtonWidget.Cast( layoutRoot.FindAnyWidget("btn_down") );
465 m_Developer = PluginDeveloper.Cast( GetPlugin(PluginDeveloper) );
466 m_QuantityEditBox = EditBoxWidget.Cast( layoutRoot.FindAnyWidget("txt_quantity_value") );
467 m_DamageEditBox = EditBoxWidget.Cast( layoutRoot.FindAnyWidget("txt_damage_value") );
468 m_SpawnDistanceEditBox = EditBoxWidget.Cast( layoutRoot.FindAnyWidget("txt_distance_value") );
469 m_PresetNewButton = ButtonWidget.Cast( layoutRoot.FindAnyWidget("btn_new") );
470 m_PresetDeleteButton = ButtonWidget.Cast( layoutRoot.FindAnyWidget("btn_delete") );
471 m_PresetRenameButton = ButtonWidget.Cast( layoutRoot.FindAnyWidget("btn_rename") );
472 m_PresetSetDefaultButton = ButtonWidget.Cast( layoutRoot.FindAnyWidget("btn_default") );
473 m_CopyToClipboardButton = ButtonWidget.Cast( layoutRoot.FindAnyWidget("btn_copy_to_clipboard") );
474 m_ConfigsButton = EditBoxWidget.Cast( layoutRoot.FindAnyWidget("btn_top_configs") );
475 m_SpawnDistanceEditBox.SetText( m_ConfigDebugProfile.GetSpawnDistance().ToString() );
476
478
481
482 PopupHideAll();
483
484 return layoutRoot;
485 }
486
487 override bool OnDoubleClick( Widget w, int x, int y, int button )
488 {
490 {
492
493 //float distance = m_SpawnDistanceEditBox.GetText().ToFloat();
495 {
497 return true;
498 }
499 else
500 {
501 float health = -1;
502 int quantity = -1;
503 if(GetCurrentItemIndex() != -1)
504 {
506 quantity = m_ConfigDebugProfile.GetItemQuantity( GetCurrentPresetName(), GetCurrentItemIndex() );
507 }
508 m_Developer.SpawnEntityInPlayerInventory( PlayerBase.Cast( g_Game.GetPlayer() ), m_SelectedObject, health, quantity);
509 return true;
510 }
511 }
512 return false;
513 }
514 //============================================
515 // OnClick
516 //============================================
517 override bool OnClick(Widget w, int x, int y, int button)
518 {
519 super.OnClick(w, x, y, button);
520
521 int row_index;
522
523 if ( w == m_WgtBtnSceneManager )
524 {
525 PopupOpen(POPUP_ID_SCENE_MANAGER, Param.Cast( NULL ) );
526
527 return true;
528 }
529 else if( w == m_ConfigsButton )
530 {
532 return true;
533 }
534 else if( w == m_PresetsTextListbox )
535 {
539 return true;
540 }
541 else if ( w == m_PresetSetDefaultButton )
542 {
543 if ( GetCurrentPresetName() != "" )
544 {
546 }
547 return true;
548 }
549 else if ( w == m_PresetNewButton )
550 {
552 RefreshLists();
553 return true;
554 }
555 else if ( w == m_PresetRenameButton )
556 {
558 return true;
559 }
560 else if( w == m_CopyToClipboardButton )
561 {
562 g_Game.CopyToClipboard( m_SelectedObject );
563 return true;
564 }
565 else if ( w == m_PresetDeleteButton )
566 {
567 if ( GetCurrentPresetName() != "" )
568 {
569 DeletePreset();
570 }
571 return true;
572 }
574 {
576
577 float distance = m_SpawnDistanceEditBox.GetText().ToFloat();
578 float health = -1;
579 int quantity = -1;
580 if( GetCurrentItemIndex() != -1 )
581 {
583 quantity = m_ConfigDebugProfile.GetItemQuantity( GetCurrentPresetName(), GetCurrentItemIndex() );
584 }
585
586 switch ( w )
587 {
589 {
591 {
592 // SpawnPresetOnGround
593 ;//SetPreset( true, m_SelectedObject, spawn_type, distance );
594 }
595 else
596 m_Developer.SpawnEntityOnCursorDir( PlayerBase.Cast( g_Game.GetPlayer() ), m_SelectedObject, quantity, distance, health );
597 break;
598 }
599
601 {
602 Man player = g_Game.GetPlayer();
603
604 vector rayStart = g_Game.GetCurrentCameraPosition();
605 vector rayEnd = rayStart + g_Game.GetCurrentCameraDirection() * 1.5;
606 vector hitPos;
607 vector hitNormal;
608 int hitComponentIndex;
609 ref set<Object> hitObjects = new set<Object>;
610 DayZPhysics.RaycastRV(rayStart, rayEnd, hitPos, hitNormal, hitComponentIndex, hitObjects, NULL, player);
611
612 Object target = NULL;
613 if( hitObjects.Count() )
614 target = hitObjects.Get(0);
615
616 if ( target != NULL && target.IsInherited(EntityAI) )
617 {
618 EntityAI att_parent = EntityAI.Cast( target );
619 m_Developer.SpawnEntityAsAttachment( PlayerBase.Cast( player ), att_parent, m_SelectedObject, health, quantity);
620 }
621 else
622 {
623 m_Developer.SpawnEntityAsAttachment( PlayerBase.Cast( player ), player, m_SelectedObject, health, quantity);
624 }
625 break;
626 }
627
629 {
630 m_Developer.SpawnEntityInPlayerInventory( PlayerBase.Cast( g_Game.GetPlayer() ), m_SelectedObject, health, quantity);
631 break;
632 }
633 }
634 return true;
635 }
636 else if( w == m_PresetItemsTextListbox )
637 {
640
641 if( GetCurrentItemIndex() != -1 )
642 {
643 float item_health = m_ConfigDebugProfile.GetItemHealth( GetCurrentPresetName(), GetCurrentItemIndex() );
644 int item_quantity = m_ConfigDebugProfile.GetItemQuantity( GetCurrentPresetName(), GetCurrentItemIndex() );
645
646 m_DamageEditBox.SetText( item_health.ToString() );
647 m_QuantityEditBox.SetText( item_quantity.ToString() );
648 }
649
650 return true;
651 }
652 else if( w == m_UpButton )
653 {
654 ItemMoveUp();
655 return true;
656 }
657 else if( w == m_DownButton )
658 {
659 ItemMoveDown();
660 return true;
661 }
662 else if( w == m_WgtBtnLeftPresets )
663 {
664 if( m_WgtPnlWrapper.IsVisible() )
665 {
666 m_WgtPnlWrapper.Show(false);
667 m_WgtBtnLeftPresets.SetText("Presets >>");
668 }
669 else
670 {
671 m_WgtPnlWrapper.Show(true);
672 m_WgtBtnLeftPresets.SetText("Presets <<");
673 }
674
675 return true;
676 }
677 else if ( w == m_PresetAddItemtButton )
678 {
680 return true;
681 }
682 else if ( w == m_PresetRemoveItemButton )
683 {
685 return true;
686 }
687 else if ( w == m_WgtBtnPositionManager )
688 {
689 m_PopupScriptPositionManager = UIPopupScriptPositionManager.Cast( PopupOpen( POPUP_ID_POSITION_MANAGER, Param.Cast( NULL ) ) );
690 return true;
691 }
692 else if ( w == m_WgtBtnSceneSettings )
693 {
695 return true;
696 }
697 else if ( w == m_SlWgtSelect )
698 {
699 row_index = m_SlWgtLbxObjectsList.GetSelectedRow();
700
701 if ( m_SlObjectsList.Count() > 0 && m_SlObjectsList.Count() > row_index )
702 {
703 m_ModuleSceneManager.SelectObject(m_SlObjectsList.GetElement(row_index));
704 }
705
706 return true;
707 }
708 else if ( w == m_SlWgtFocus )
709 {
710 m_ModuleSceneManager.SelectedObjectFocus();
711
712 return true;
713 }
714 else if ( w == m_WgtBtnSceneSave )
715 {
716 m_ModuleSceneManager.SceneSave();
717
718 return true;
719 }
720 else if ( w == m_WgtBtnEditorSettings )
721 {
723
724 return true;
725 }
726 else if ( w == m_WgtBtnEditInitScript )
727 {
728 Param2<int, SceneObject> param = new Param2<int, SceneObject>( m_ModuleSceneManager.GetSelectedSceneObjectIndex(), m_ModuleSceneManager.GetSelectedSceneObject() );
730
731 return true;
732 }
733 else if ( w == m_WgtBtnDeleteRuler )
734 {
735 m_ModuleSceneManager.RulerDelete();
736
737 return true;
738 }
739
740 bool ret = ComponentsOnClick(w, x, y, button);
741
742 return ret;
743 }
744
745 //============================================
746 // OnChange
747 //============================================
748 override bool OnChange(Widget w, int x, int y, bool finished)
749 {
750 super.OnChange(w, x, y, finished);
751
752 if (w == m_ClWgtEbxFilter)
753 {
755 return true;
756 }
757 else if (w == m_SlWgtEbxFilter)
758 {
760 return true;
761 }
762 else if ( w == m_PrWgtPoxX && finished )
763 {
764 m_ModuleSceneManager.SelectedObjectSetPosX(m_PrWgtPoxX.GetText().ToFloat());
765 }
766 else if ( w == m_PrWgtPoxY && finished )
767 {
768 m_ModuleSceneManager.SelectedObjectSetPosY(m_PrWgtPoxY.GetText().ToFloat());
769 }
770 else if ( w == m_PrWgtPoxZ && finished )
771 {
772 m_ModuleSceneManager.SelectedObjectSetPosZ(m_PrWgtPoxZ.GetText().ToFloat());
773 }
774 else if ( w == m_PrWgtDir && finished )
775 {
776 m_ModuleSceneManager.SelectedObjectSetRot(m_PrWgtDir.GetText().ToFloat());
777 return true;
778 }
779 else if ( w == m_PrWgtDmg && finished )
780 {
781 m_ModuleSceneManager.SelectedObjectSetDamage(m_PrWgtDmg.GetText().ToFloat());
782 return true;
783 }
784 else if ( w == m_QuantityEditBox )
785 {
786 m_ConfigDebugProfile.SetItemQuantity( GetCurrentPresetName(), GetCurrentItemIndex(), m_QuantityEditBox.GetText().ToInt() );
787 return true;
788 }
789 else if ( w == m_DamageEditBox )
790 {
791 m_ConfigDebugProfile.SetItemHealth( GetCurrentPresetName(), GetCurrentItemIndex(), m_DamageEditBox.GetText().ToFloat() );
792 return true;
793 }
794
795 bool ret = ComponentsOnChange(w, x, y, finished);
796
797 return false;
798 }
799
800 override void OnShow()
801 {
802 g_Game.GetMission().AddActiveInputExcludes({"menu"});
803 }
804
805 override void OnHide()
806 {
807 g_Game.GetMission().RemoveActiveInputExcludes({"menu"},true);
808 }
809
810 //============================================
811 // OnMouseWheel
812 //============================================
813 override bool OnMouseWheel(Widget w, int x, int y, int wheel)
814 {
815 super.OnMouseWheel(w, x, y, wheel);
816
817 m_ModuleSceneManager.OnMouseWheel(wheel);
818 return true;
819 }
820
821 //============================================
822 // OnItemSelected
823 //============================================
824 override bool OnItemSelected(Widget w, int x, int y, int row, int column, int oldRow, int oldColumn)
825 {
826
827 super.OnItemSelected(w, x, y, row, column, oldRow, oldColumn);
828
829 if ( w == m_ClWgtLbxClassesList )
830 {
831 string selected_class_name;
832 m_ClWgtLbxClassesList.GetItemText( m_ClWgtLbxClassesList.GetSelectedRow(), 0, selected_class_name );
833 m_ModuleSceneManager.SelectClassName(selected_class_name);
834
835 SceneObject obj_selected = m_ModuleSceneManager.GetSelectedSceneObject();
838 }
839 else if ( w == m_SlWgtLbxObjectsList )
840 {
841 int row_index = m_SlWgtLbxObjectsList.GetSelectedRow();
842
843 if ( m_SlObjectsList && row_index > -1 && m_SlObjectsList.Count() > 0 && m_SlObjectsList.Count() > row_index )
844 {
845 m_ModuleSceneManager.SelectObject(m_SlObjectsList.GetElement(row_index));
846 }
847 }
848
849 if( m_PopupScriptPositionManager != NULL )
850 {
851 m_PopupScriptPositionManager.OnItemSelected(w, x, y, row, column, oldRow, oldColumn);
852 }
853
854 return true;
855 }
856
857 // Scripted Events
858 //============================================
859 // PopupOpen
860 //============================================
861 UIPopupScript PopupOpen(int popup_id, Param param)
862 {
863 // Open background image (black transparent) under popups
864 if ( m_OpenedPopups.Count() == 0 )
865 {
866 m_WgtPopupsMain.Show(true);
867 m_WgtPopupsBg.Show(true);
868 }
869 else
870 {
871 int popup_curr_id = m_OpenedPopups.Get(m_OpenedPopups.Count() - 1);
872 m_Popups.Get(popup_curr_id).Show(false);
873 }
874
875 m_OpenedPopups.Insert(popup_id);
876
877 UIPopupScript popup = m_Popups.Get(popup_id);
878
879 popup.Show(true);
880 popup.OnOpen(param);
881
882 return popup;
883 }
884
885 //============================================
886 // PopupBack
887 //============================================
889 {
890 if ( m_OpenedPopups.Count() > 0 )
891 {
892 int popup_curr_id = m_OpenedPopups.Get(m_OpenedPopups.Count() - 1);
893
894 m_Popups.Get(popup_curr_id).Show(false);
895 m_Popups.Get(popup_curr_id).OnClose();
896
897 m_OpenedPopups.Remove(m_OpenedPopups.Count() - 1);
898
899 if ( m_OpenedPopups.Count() > 0 )
900 {
901 int ppp_id = m_OpenedPopups.Get(m_OpenedPopups.Count() - 1);
902 m_Popups.Get(ppp_id).Show(true);
903 m_Popups.Get(ppp_id).OnOpen(NULL);
904
905 return m_Popups.Get(ppp_id);
906 }
907 }
908
909 m_WgtPopupsMain.Show(false);
910 m_WgtPopupsBg.Show(false);
911
912 return NULL;
913 }
914
915 //============================================
916 // PopupCloseAll
917 //============================================
919 {
920 if ( m_OpenedPopups.Count() > 0 )
921 {
922 int popup_curr_id = m_OpenedPopups.Get(m_OpenedPopups.Count() - 1);
923
924 m_Popups.Get(popup_curr_id).Show(false);
925 m_Popups.Get(popup_curr_id).OnClose();
926
927 m_OpenedPopups.Clear();
928 }
929 }
930
931
932
933 //============================================
934 // ToggleVisibility (Show/Hide of editor)
935 //============================================
937 {
938 m_WgtRoot.Show( m_ModuleSceneManager.IsOpened() );
939 }
940
941 //============================================
942 // Refresh
943 //============================================
944 override void Refresh()
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
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 }
1027
1029 {
1030 Param2<int, Param> p = Param2<int, Param>.Cast( params );
1031 int cmd_id = p.param1;
1032
1033 switch ( cmd_id )
1034 {
1035 case PluginSceneManager.SCENE_EDITOR_CMD_REFRESH:
1036 Refresh();
1037 break;
1038
1039 case PluginSceneManager.SCENE_EDITOR_CMD_SAVE:
1040 m_NotifyWgtPanel.SetAlpha(1.0);
1041 m_NotifyFadeTimer.FadeOut(m_NotifyWgtPanel, 2, true);
1042 break;
1043 }
1044 }
1045
1046
1047//---------------------------------------------------------------------------------
1048// >> Protected Scope
1050 protected PluginSceneManager m_ModuleSceneManager;
1051
1052//---------------------------------------------------------------------------------
1053// >> protected Scope
1054
1055 // Top Panel
1056 protected ButtonWidget m_WgtBtnSceneManager;
1057 protected ButtonWidget m_WgtBtnSceneSettings;
1058 protected ButtonWidget m_WgtBtnSceneSave;
1059 protected ButtonWidget m_WgtBtnEditorSettings;
1060 protected ButtonWidget m_WgtBtnDeleteRuler;
1061
1062 // Popups
1067
1068 // Scene Object List
1070 protected string m_SlSelectedClass;
1072 protected TextListboxWidget m_SlWgtLbxObjectsList;
1074 protected ButtonWidget m_SlWgtSelect;
1075 protected ButtonWidget m_SlWgtFocus;
1076
1077 // Config Class List
1078 protected string m_ClSelectedClass;
1081 protected TextListboxWidget m_ClWgtLbxClassesList;
1082 protected ButtonWidget m_ClWgtButtonAddAtt;
1083
1084 // Properties
1091 protected ButtonWidget m_WgtBtnEditInitScript;
1094
1096
1097 // Notify
1098 protected ref WidgetFadeTimer m_NotifyFadeTimer;
1100
1101 //Other
1102 protected TextListboxWidget m_PresetsTextListbox;
1103 protected TextListboxWidget m_PresetItemsTextListbox;
1104 protected ButtonWidget m_PresetAddItemtButton;
1105 protected ButtonWidget m_PresetRemoveItemButton;
1106 protected ButtonWidget m_SpawnOnGroundButton;
1107 protected ButtonWidget m_SpawnInInventoryButton;
1108 protected ButtonWidget m_SpawnAsAttachmentButton;
1109 protected ButtonWidget m_UpButton;
1110 protected ButtonWidget m_DownButton;
1111 protected ButtonWidget m_PresetNewButton;
1112 protected ButtonWidget m_PresetDeleteButton;
1113 protected ButtonWidget m_PresetRenameButton;
1114 protected ButtonWidget m_PresetSetDefaultButton;
1115 protected ButtonWidget m_CopyToClipboardButton;
1121 protected ButtonWidget m_WgtBtnLeftPresets;
1122 protected ButtonWidget m_WgtBtnPositionManager;
1123
1124 protected string m_SelectedObject;
1126 protected PluginDeveloper m_Developer;
1127 protected UIPopupScriptPositionManager m_PopupScriptPositionManager;
1128 protected PluginConfigDebugProfileFixed m_ConfigDebugProfileFixed;
1130
1131 //---- Functions
1132 protected void RefreshByLocalProfile();
1133
1134 //--------------------------------------------
1135 // UpdateListObjects
1136 //--------------------------------------------
1137 private void UpdateListObjects()
1138 {
1140
1141 m_SlWgtLbxObjectsList.ClearItems();
1142
1143 int row = -1;
1144 SceneObject selected_object = m_ModuleSceneManager.GetSelectedSceneObject();
1145
1146 for ( int i = 0; i < m_SlObjectsList.Count(); ++i )
1147 {
1148 SceneObject scene_obj = m_SlObjectsList.GetElement(i);
1149
1150 if ( selected_object != NULL && selected_object == scene_obj )
1151 {
1152 row = i;
1153 }
1154
1155 m_SlWgtLbxObjectsList.AddItem(scene_obj.GetTypeName(), NULL, 0);
1156 }
1157
1158 m_SlWgtLbxObjectsList.SelectRow(row);
1159 }
1160
1161 //--------------------------------------------
1162 // UpdateListClasses
1163 //--------------------------------------------
1164 protected void UpdateListClasses()
1165 {
1167
1168 m_ClWgtLbxClassesList.ClearItems();
1169
1170 for ( int i = 0; i < m_ClClassesList.Count(); ++i )
1171 {
1172 m_ClWgtLbxClassesList.AddItem(m_ClClassesList.Get(i), NULL, 0);
1173 }
1174 }
1175
1176 //--------------------------------------------
1177 // GetFiltredSceneObjects
1178 //--------------------------------------------
1179 protected map<int, SceneObject> GetFiltredSceneObjects( string search_string, map<int, SceneObject> array_ret )
1180 {
1181 array<ref SceneObject> scene_objects = m_ModuleSceneManager.GetSceneObjectsAll();
1182
1183 search_string.ToLower();
1184
1185 array_ret.Clear();
1186
1187 if( scene_objects != NULL )
1188 {
1189 for ( int i=0; i < scene_objects.Count(); ++i )
1190 {
1191 SceneObject sc_obj = scene_objects.Get(i);
1192
1193 string obj_name = sc_obj.GetTypeName();
1194
1195 obj_name.ToLower();
1196
1197 if ( obj_name.Contains(search_string))
1198 {
1199 array_ret.Insert(i, sc_obj);
1200 }
1201 }
1202 }
1203
1204 return array_ret;
1205 }
1206
1207 //--------------------------------------------
1208 // GetFiltredConfigClasses
1209 //--------------------------------------------
1210 TStringArray GetFiltredConfigClasses( string search_string, TStringArray array_ret )
1211 {
1212 TStringArray searching_in = new TStringArray;
1213 searching_in.Insert(CFG_VEHICLESPATH);
1214 searching_in.Insert(CFG_WEAPONSPATH);
1215 searching_in.Insert(CFG_MAGAZINESPATH);
1216
1217 array_ret.Clear();
1218
1219 search_string.ToLower();
1220
1221 for ( int s = 0; s < searching_in.Count(); ++s )
1222 {
1223 string config_path = searching_in.Get(s);
1224
1225 int objects_count = g_Game.ConfigGetChildrenCount(config_path);
1226 for (int i = 0; i < objects_count; i++)
1227 {
1228 string childName;
1229 g_Game.ConfigGetChildName(config_path, i, childName);
1230
1231 int scope = g_Game.ConfigGetInt(config_path + " " + childName + " scope");
1232 if ( scope == 0 )
1233 {
1234 continue;
1235 }
1236
1237 string nchName = childName;
1238 nchName.ToLower();
1239
1240 if ( nchName.Contains(search_string))
1241 {
1242 array_ret.Insert(childName);
1243 }
1244 }
1245 }
1246
1247 return array_ret;
1248 }
1249
1250 //--------------------------------------------
1251 // PopupClose
1252 //--------------------------------------------
1253 private void PopupClose(int popup_id)
1254 {
1255 }
1256
1257 //--------------------------------------------
1258 // PopupCloseAll
1259 //--------------------------------------------
1260 private void PopupHideAll()
1261 {
1262 for ( int i = 0; i < m_Popups.Count(); ++i )
1263 {
1264 m_Popups.Get(i).Show(false);
1265 }
1266
1267 m_WgtPopupsMain.Show(false);
1268 m_WgtPopupsBg.Show(false);
1269 }
1270
1271 //--------------------------------------------
1272 // ComponentsOnClick
1273 //--------------------------------------------
1274 private bool ComponentsOnClick(Widget w, int x, int y, int button)
1275 {
1276 for ( int i = 0; i < m_Popups.Count(); ++i )
1277 {
1278 if ( m_Popups.Get(i).OnClick(w, x, y, button) )
1279 {
1280 return true;
1281 }
1282 }
1283
1284 for ( int j = 0; j < m_PrWidgetsAttachments.Count(); ++j )
1285 {
1286 if ( m_PrWidgetsAttachments.Get(j).OnClick(w, x, y, button) )
1287 {
1288 return true;
1289 }
1290 }
1291
1292 return false;
1293 }
1294
1295 //--------------------------------------------
1296 // ComponentsOnChange
1297 //--------------------------------------------
1298 private bool ComponentsOnChange(Widget w, int x, int y, bool finished)
1299 {
1300 for ( int i = 0; i < m_Popups.Count(); ++i )
1301 {
1302 if ( m_Popups.Get(i).OnChange(w, x, y, finished) )
1303 {
1304 return true;
1305 }
1306 }
1307
1308 return false;
1309 }
1310
1311 //--------------------------------------------
1312 // GetFreeUIPropertyAttchament
1313 //--------------------------------------------
1315 {
1316 for ( int i = 0; i < m_PrWidgetsAttachments.Count(); ++i )
1317 {
1319
1320 if ( !ui_comp.IsVisible() )
1321 {
1322 return ui_comp;
1323 }
1324 }
1325
1327 m_PrWidgetsAttachments.Insert(ui_prop);
1328
1329 return ui_prop;
1330 }
1331
1332 //--------------------------------------------
1333 // GetItemNamesForSlots
1334 //--------------------------------------------
1336 {
1337 TStringArray searching_in = new TStringArray;
1338 searching_in.Insert(CFG_VEHICLESPATH);
1339 searching_in.Insert(CFG_WEAPONSPATH);
1340 searching_in.Insert(CFG_MAGAZINESPATH);
1341
1343
1344 for ( int m = 0; m < slots.Count(); ++m )
1345 {
1346 array_ret.Insert(slots.Get(m), new TStringArray);
1347 }
1348
1349 TStringArray inv_slots = new TStringArray;
1350 string inv_slot;
1351 string childName;
1352
1353 for ( int s = 0; s < searching_in.Count(); ++s )
1354 {
1355 string config_path = searching_in.Get(s);
1356
1357 int objects_count = g_Game.ConfigGetChildrenCount(config_path);
1358 for (int i = 0; i < objects_count; i++)
1359 {
1360 g_Game.ConfigGetChildName(config_path, i, childName);
1361
1362 g_Game.ConfigGetTextArray(config_path + " " + childName + " inventorySlot", inv_slots);
1363
1364 if ( inv_slots.Count() > 0 )
1365 {
1366 for ( int j = 0; j < inv_slots.Count(); ++j )
1367 {
1368 inv_slot = "";
1369 inv_slot = inv_slots.Get(j);
1370
1371 for ( int k = 0; k < slots.Count(); ++k )
1372 {
1373 string finding_slot_type = slots.Get(k);
1374
1375 if ( inv_slot == finding_slot_type )
1376 {
1377 array_ret.Get(finding_slot_type).Insert(childName);
1378 }
1379 }
1380 }
1381 }
1382 else
1383 {
1384 inv_slot = "";
1385 g_Game.ConfigGetText(config_path + " " + childName + " inventorySlot", inv_slot);
1386
1387 if ( inv_slot != "" )
1388 {
1389 for ( int l = 0; l < slots.Count(); ++l )
1390 {
1391 string finding_slot_type_2 = slots.Get(l);
1392
1393 if ( inv_slot == finding_slot_type_2 )
1394 {
1395 array_ret.Get(finding_slot_type_2).Insert(childName);
1396 }
1397 }
1398 }
1399 }
1400 }
1401 }
1402
1403 return array_ret;
1404 }
1405}
DayZGame g_Game
Определения DayZGame.c:3942
Icon x
Icon y
class OptionSelectorMultistate extends OptionSelector class_name
PluginBase GetPlugin(typename plugin_type)
Определения PluginManager.c:325
bool IsModuleExist(typename plugin_type)
Определения PluginManager.c:361
Param3< string, bool, bool > PresetParams
Определения ScriptConsoleItemsTab.c:1
static proto bool RaycastRV(vector begPos, vector endPos, out vector contactPos, out vector contactDir, out int contactComponent, set< Object > results=NULL, Object with=NULL, Object ignore=NULL, bool sorted=false, bool ground_only=false, int iType=ObjIntersectView, float radius=0.0, CollisionFlags flags=CollisionFlags.NEARESTCONTACT)
Raycasts world by given parameters.
Определения DayZPhysics.c:124
Определения EnWidgets.c:354
Определения ObjectTyped.c:2
Определения PPEConstants.c:68
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Определения param.c:12
Определения PlayerBaseClient.c:2
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
Определения SceneObject.c:2
Определения EnWidgets.c:220
void Show(bool show)
Определения UIPopupScript.c:19
void OnOpen(Param param)
Определения UIPopupScript.c:11
Определения UIPopupScript.c:2
void SetSize(float width, float height)
Определения UIPropertyAttachment.c:64
bool IsVisible()
Определения UIPropertyAttachment.c:110
void Show(EntityAI e, string slot_name, TStringArray att_items)
Определения UIPropertyAttachment.c:69
void SetPos(float x, float y)
Определения UIPropertyAttachment.c:59
ButtonWidget m_DownButton
Определения SceneEditorMenu.c:1110
int GetCurrentItemIndex()
Определения SceneEditorMenu.c:229
static const int POPUP_ID_SCENE_RENAME
Определения SceneEditorMenu.c:8
EditBoxWidget m_DamageEditBox
Определения SceneEditorMenu.c:1116
override void OnShow()
Определения SceneEditorMenu.c:800
void ToggleVisibility()
Определения SceneEditorMenu.c:936
EditBoxWidget m_PrWgtPoxX
Определения SceneEditorMenu.c:1086
static const int POPUP_ID_PRESET_NEW
Определения SceneEditorMenu.c:14
PluginConfigDebugProfile m_ConfigDebugProfile
Определения SceneEditorMenu.c:1129
PluginDeveloper m_Developer
Определения SceneEditorMenu.c:1126
TextListboxWidget m_PresetItemsTextListbox
Определения SceneEditorMenu.c:1103
string m_SlSelectedClass
Определения SceneEditorMenu.c:1070
UIPropertyAttachment GetFreeUIPropertyAttchament()
Определения SceneEditorMenu.c:1314
void PopupHideAll()
Определения SceneEditorMenu.c:1260
static const int POPUP_ID_EDITOR_SETTINGS
Определения SceneEditorMenu.c:11
ref TStringArray m_ClClassesList
Определения SceneEditorMenu.c:1079
void UpdateListObjects()
Определения SceneEditorMenu.c:1137
override void Refresh()
Определения SceneEditorMenu.c:944
void SetDefaultPreset(int preset_index)
Определения SceneEditorMenu.c:102
EditBoxWidget m_ConfigsButton
Определения SceneEditorMenu.c:1119
static const int POPUP_ID_CONFIGS
Определения SceneEditorMenu.c:16
ButtonWidget m_WgtBtnEditorSettings
Определения SceneEditorMenu.c:1059
void RefreshLists()
Определения SceneEditorMenu.c:143
ButtonWidget m_WgtBtnEditInitScript
Определения SceneEditorMenu.c:1091
TextListboxWidget m_PresetsTextListbox
Определения SceneEditorMenu.c:1102
Widget m_WgtPnlWrapper
Определения SceneEditorMenu.c:1120
ButtonWidget m_PresetDeleteButton
Определения SceneEditorMenu.c:1112
override bool UseMouse()
Определения SceneEditorMenu.c:345
ref array< ref UIPropertyAttachment > m_PrWidgetsAttachments
Определения SceneEditorMenu.c:1095
static const int POPUP_ID_SCENE_NEW
Определения SceneEditorMenu.c:7
UIPopupScript PopupOpen(int popup_id, Param param)
Определения SceneEditorMenu.c:861
ButtonWidget m_PresetRemoveItemButton
Определения SceneEditorMenu.c:1105
void SceneEditorCommand(Param params)
Определения SceneEditorMenu.c:1028
void SaveProfileSpawnDistance()
Определения SceneEditorMenu.c:333
Widget m_NotifyWgtPanel
Определения SceneEditorMenu.c:1099
UIPopupScriptPositionManager m_PopupScriptPositionManager
Определения SceneEditorMenu.c:1127
void PopupClose(int popup_id)
Определения SceneEditorMenu.c:1253
ButtonWidget m_WgtBtnSceneSave
Определения SceneEditorMenu.c:1058
ButtonWidget m_WgtBtnSceneSettings
Определения SceneEditorMenu.c:1057
EditBoxWidget m_PrWgtDir
Определения SceneEditorMenu.c:1089
EditBoxWidget m_PrWgtPoxY
Определения SceneEditorMenu.c:1087
override bool OnMouseWheel(Widget w, int x, int y, int wheel)
Определения SceneEditorMenu.c:813
int GetCurrentPresetIndex()
Определения SceneEditorMenu.c:224
static const int POPUP_ID_PRESET_RENAME
Определения SceneEditorMenu.c:15
Widget m_PrWgtAttTitle
Определения SceneEditorMenu.c:1093
EditBoxWidget m_PrWgtDmg
Определения SceneEditorMenu.c:1090
ButtonWidget m_SpawnInInventoryButton
Определения SceneEditorMenu.c:1107
void ~SceneEditorMenu()
Определения SceneEditorMenu.c:376
string GetCurrentObjectName()
Определения SceneEditorMenu.c:212
void SceneEditorMenu()
Определения SceneEditorMenu.c:362
override bool OnDoubleClick(Widget w, int x, int y, int button)
Определения SceneEditorMenu.c:487
static const int POPUP_ID_NOTIFY
Определения SceneEditorMenu.c:10
void RenderPresetItems()
Определения SceneEditorMenu.c:159
ButtonWidget m_WgtBtnLeftPresets
Определения SceneEditorMenu.c:1121
PluginConfigDebugProfileFixed m_ConfigDebugProfileFixed
Определения SceneEditorMenu.c:1128
static const int POPUP_ID_INIT_SCRIPT
Определения SceneEditorMenu.c:12
bool ComponentsOnChange(Widget w, int x, int y, bool finished)
Определения SceneEditorMenu.c:1298
Widget m_PrWgtAttRoot
Определения SceneEditorMenu.c:1092
EditBoxWidget m_QuantityEditBox
Определения SceneEditorMenu.c:1117
void ItemMoveUp()
Определения SceneEditorMenu.c:311
ButtonWidget m_SpawnAsAttachmentButton
Определения SceneEditorMenu.c:1108
override void OnHide()
Определения SceneEditorMenu.c:805
UIPopupScript PopupBack()
Определения SceneEditorMenu.c:888
void PopupCloseAll()
Определения SceneEditorMenu.c:918
override bool OnItemSelected(Widget w, int x, int y, int row, int column, int oldRow, int oldColumn)
Определения SceneEditorMenu.c:824
bool IsCurrentPresetFixed()
Определения SceneEditorMenu.c:234
ButtonWidget m_WgtBtnPositionManager
Определения SceneEditorMenu.c:1122
void SetPreset(bool clear_inventory, string preset_name)
spawn preset items into inventory
Определения SceneEditorMenu.c:268
TextListboxWidget m_SlWgtLbxObjectsList
Определения SceneEditorMenu.c:1072
ButtonWidget m_PresetNewButton
Определения SceneEditorMenu.c:1111
TStringArray GetFiltredConfigClasses(string search_string, TStringArray array_ret)
Определения SceneEditorMenu.c:1210
ref map< int, SceneObject > m_SlObjectsList
Определения SceneEditorMenu.c:1071
ButtonWidget m_SpawnOnGroundButton
Определения SceneEditorMenu.c:1106
Widget m_WgtRoot
Определения SceneEditorMenu.c:1049
static const int POPUP_ID_SCENE_MANAGER
Определения SceneEditorMenu.c:5
override bool OnChange(Widget w, int x, int y, bool finished)
Определения SceneEditorMenu.c:748
static const int POPUP_ID_POSITION_MANAGER
Определения SceneEditorMenu.c:13
void RemoveItemFromPreset()
Определения SceneEditorMenu.c:258
ButtonWidget m_SlWgtSelect
Определения SceneEditorMenu.c:1074
ButtonWidget m_ClWgtButtonAddAtt
Определения SceneEditorMenu.c:1082
ButtonWidget m_PresetAddItemtButton
Определения SceneEditorMenu.c:1104
override bool UseKeyboard()
Определения SceneEditorMenu.c:353
bool m_SelectedObjectIsPreset
Определения SceneEditorMenu.c:1125
PluginSceneManager m_ModuleSceneManager
Определения SceneEditorMenu.c:1050
ButtonWidget m_WgtBtnSceneManager
Определения SceneEditorMenu.c:1056
static const int POPUP_ID_SCENE_SETTINGS
Определения SceneEditorMenu.c:6
Widget m_WgtPopupsBg
Определения SceneEditorMenu.c:1064
ButtonWidget m_UpButton
Определения SceneEditorMenu.c:1109
ref WidgetFadeTimer m_NotifyFadeTimer
Определения SceneEditorMenu.c:1098
void RenamePreset(string new_preset_name)
Определения SceneEditorMenu.c:149
ButtonWidget m_CopyToClipboardButton
Определения SceneEditorMenu.c:1115
EditBoxWidget m_ClWgtEbxFilter
Определения SceneEditorMenu.c:1080
string m_SelectedObject
Определения SceneEditorMenu.c:1124
ref TIntArray m_OpenedPopups
Определения SceneEditorMenu.c:1065
int GetPresetIndexByName(string preset_name)
Определения SceneEditorMenu.c:71
void UpdateListClasses()
Определения SceneEditorMenu.c:1164
ButtonWidget m_SlWgtFocus
Определения SceneEditorMenu.c:1075
EditBoxWidget m_PrWgtPoxZ
Определения SceneEditorMenu.c:1088
TextWidget m_PrWgtClassName
Определения SceneEditorMenu.c:1085
void NewPreset(string preset_name)
Определения SceneEditorMenu.c:87
static const int POPUP_ID_SCENE_DELETE
Определения SceneEditorMenu.c:9
override Widget Init()
Определения SceneEditorMenu.c:392
bool ComponentsOnClick(Widget w, int x, int y, int button)
Определения SceneEditorMenu.c:1274
override bool OnClick(Widget w, int x, int y, int button)
Определения SceneEditorMenu.c:517
string m_ClSelectedClass
Определения SceneEditorMenu.c:1078
string GetCurrentItemName()
Определения SceneEditorMenu.c:201
ButtonWidget m_PresetRenameButton
Определения SceneEditorMenu.c:1113
Widget m_WgtPopupsMain
Определения SceneEditorMenu.c:1063
EditBoxWidget m_SpawnDistanceEditBox
Определения SceneEditorMenu.c:1118
TextWidget m_SlWgtLoadedScene
Определения SceneEditorMenu.c:1069
void ItemMoveDown()
Определения SceneEditorMenu.c:322
void DeletePreset()
Определения SceneEditorMenu.c:93
EditBoxWidget m_SlWgtEbxFilter
Определения SceneEditorMenu.c:1073
const string CONST_DEFAULT_PRESET_PREFIX
Определения SceneEditorMenu.c:17
ButtonWidget m_WgtBtnDeleteRuler
Определения SceneEditorMenu.c:1060
bool IsPresetFixed(string preset_name)
Определения SceneEditorMenu.c:59
map< string, ref TStringArray > GetItemNamesForSlots(TStringArray slots)
Определения SceneEditorMenu.c:1335
ref map< int, ref UIPopupScript > m_Popups
Определения SceneEditorMenu.c:1066
map< int, SceneObject > GetFiltredSceneObjects(string search_string, map< int, SceneObject > array_ret)
Определения SceneEditorMenu.c:1179
TextListboxWidget m_ClWgtLbxClassesList
Определения SceneEditorMenu.c:1081
void RefreshByLocalProfile()
string GetCurrentPresetName()
Определения SceneEditorMenu.c:188
ButtonWidget m_PresetSetDefaultButton
Определения SceneEditorMenu.c:1114
void RenderPresets()
Определения SceneEditorMenu.c:20
void AddItemToPreset()
Определения SceneEditorMenu.c:246
Определения DayZGame.c:64
Определения EnWidgets.c:190
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto string ToString(bool simple=true)
Определения CachedEquipmentStorage.c:4
proto string ToString(bool beautify=true)
Vector to string.
Определения EnConvert.c:119
array< string > TStringArray
Определения EnScript.c:712
array< int > TIntArray
Определения EnScript.c:714
array< bool > TBoolArray
Определения EnScript.c:715
const string CFG_VEHICLESPATH
Определения 3_Game/DayZ/constants.c:220
const string CFG_WEAPONSPATH
Определения 3_Game/DayZ/constants.c:221
const string CFG_MAGAZINESPATH
Определения 3_Game/DayZ/constants.c:222
bool Contains(string sample)
Returns true if sample is substring of string.
Определения EnString.c:286
proto int ToLower()
Changes string to lowercase. Returns length.