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]";
22 m_PresetsTextListbox.ClearItems();
28 TStringArray presets_array = m_ConfigDebugProfileFixed.GetPresets();
29 for ( i = 0; i < presets_array.Count(); i++ )
31 m_PresetsTextListbox.AddItem(
"["+presets_array.Get(i)+
"]",
new PresetParams ( presets_array.Get(i),
true,
false), 0);
36 for ( i = 0; i < custom_presets_array.Count(); i++ )
38 m_PresetsTextListbox.AddItem( custom_presets_array.Get(i),
new PresetParams ( custom_presets_array.Get(i),
false,
false), 0);
42 if ( default_preset !=
"" )
48 default_preset =
"[" + default_preset +
"]";
51 if( index > -1 && index < m_PresetsTextListbox.GetNumItems() )
53 m_PresetsTextListbox.GetItemData( index, 0, preset_params_array );
54 m_PresetsTextListbox.SetItem( index, default_preset + CONST_DEFAULT_PRESET_PREFIX, preset_params_array, 0 );
63 if ( preset_index > -1 && preset_index < m_PresetsTextListbox.GetNumItems() )
65 m_PresetsTextListbox.GetItemData( preset_index, 0, item_params_array );
66 return item_params_array.param2;
74 for ( i = 0; i < m_PresetsTextListbox.GetNumItems(); i++ )
77 m_PresetsTextListbox.GetItemData( i, 0, item_params_array );
79 if ( item_params_array.param1 == preset_name )
106 if ( default_preset !=
"" )
112 default_preset =
"[" + default_preset +
"]";
115 if( index > -1 && index < m_PresetsTextListbox.GetNumItems() )
117 m_PresetsTextListbox.GetItemData( index, 0, prev_preset_params_array );
118 prev_preset_params_array.param3 =
false;
119 m_PresetsTextListbox.SetItem( index, default_preset, prev_preset_params_array, 0 );
128 preset_name =
"[" + preset_name +
"]";
133 if ( index > -1 && index < m_PresetsTextListbox.GetNumItems() )
135 m_PresetsTextListbox.GetItemData( index, 0, preset_params_array );
136 preset_params_array.param3 =
true;
137 m_PresetsTextListbox.SetItem( index, preset_name + CONST_DEFAULT_PRESET_PREFIX, preset_params_array, 0 );
163 m_PresetItemsTextListbox.ClearItems();
180 for ( i = 0; i < preset_array.Count(); i++)
182 m_PresetItemsTextListbox.AddItem( preset_array.Get(i), NULL, 0);
192 if ( index > -1 && index < m_PresetsTextListbox.GetNumItems() )
195 m_PresetsTextListbox.GetItemData( index, 0, item_params_array );
196 return item_params_array.param1;
214 int selected_row_index = m_ClWgtLbxClassesList.GetSelectedRow();
215 if ( selected_row_index != -1 )
218 m_ClWgtLbxClassesList.GetItemText( selected_row_index, 0, item_name );
226 return m_PresetsTextListbox.GetSelectedRow();
231 return m_PresetItemsTextListbox.GetSelectedRow();
237 if ( index > -1 && index < m_PresetsTextListbox.GetNumItems() )
240 m_PresetsTextListbox.GetItemData( index, 0, item_params_array );
241 return item_params_array.param2;
248 int selected_row_index = m_ClWgtLbxClassesList.GetSelectedRow();
252 m_ClWgtLbxClassesList.GetItemText( selected_row_index, 0, item_name );
268 void SetPreset(
bool clear_inventory,
string preset_name)
276 if ( is_preset_fixed )
278 m_ConfigDebugProfileFixed.GetPresetItems( preset_name, preset_array );
286 if ( clear_inventory )
288 m_Developer.ClearInventory(player);
291 for ( i = 0; i < preset_array.Count(); i++)
295 if ( is_preset_fixed )
297 health = m_ConfigDebugProfileFixed.GetItemHealth( preset_name, i );
298 quantity = m_ConfigDebugProfileFixed.GetItemQuantity( preset_name, i );
306 m_Developer.SpawnEntityInInventory(player, preset_array.Get(i), health, quantity);
318 m_PresetItemsTextListbox.SelectRow (new_index);
329 m_PresetItemsTextListbox.SelectRow (new_index);
364 m_ModuleSceneManager = PluginSceneManager.Cast(
GetPlugin(PluginSceneManager) );
365 m_ModuleSceneManager.OnUIEditorOpened();
382 m_ModuleSceneManager.OnUIEditorClosed();
383 m_ModuleSceneManager = NULL;
386 m_NotifyFadeTimer.Stop();
396 m_WgtPnlWrapper = layoutRoot.FindAnyWidget(
"pnl_presets_wrapper_outer");
397 m_SlWgtLoadedScene =
TextWidget.Cast( layoutRoot.FindAnyWidget(
"txt_left_label_loaded_scene") );
399 m_SlWgtLbxObjectsList = TextListboxWidget.Cast(layoutRoot.FindAnyWidget(
"txtlist_left_items") );
401 m_SlWgtEbxFilter = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"edit_left_search_item") );
403 m_SlWgtSelect = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_left_select") );
404 m_SlWgtFocus = ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_left_focus") );
406 m_WgtPopupsMain = layoutRoot.FindAnyWidget(
"pnl_popups");
408 m_WgtPopupsBg = layoutRoot.FindAnyWidget(
"pnl_popup_bg");
410 m_ClWgtEbxFilter = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"edit_left_search_class") );
412 m_ClWgtLbxClassesList = TextListboxWidget.Cast(layoutRoot.FindAnyWidget(
"txtlist_left_classes") );
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") );
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");
436 m_NotifyWgtPanel = layoutRoot.FindAnyWidget(
"pnl_notify");
437 m_NotifyWgtPanel.SetAlpha(0.0);
438 m_NotifyFadeTimer =
new WidgetFadeTimer;
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")));
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") );
489 if( w == m_PresetItemsTextListbox || w == m_PresetsTextListbox || w == m_ClWgtLbxClassesList )
494 if ( m_SelectedObjectIsPreset )
519 super.OnClick(w,
x,
y, button);
523 if ( w == m_WgtBtnSceneManager )
529 else if( w == m_ConfigsButton )
534 else if( w == m_PresetsTextListbox )
537 m_SelectedObjectIsPreset =
true;
541 else if ( w == m_PresetSetDefaultButton )
549 else if ( w == m_PresetNewButton )
555 else if ( w == m_PresetRenameButton )
557 PopupOpen( POPUP_ID_PRESET_RENAME, NULL );
560 else if( w == m_CopyToClipboardButton )
565 else if ( w == m_PresetDeleteButton )
573 else if( w == m_SpawnOnGroundButton || w == m_SpawnAsAttachmentButton || w == m_SpawnInInventoryButton )
577 float distance = m_SpawnDistanceEditBox.GetText().ToFloat();
590 if ( m_SelectedObjectIsPreset )
608 int hitComponentIndex;
609 ref set<Object> hitObjects =
new set<Object>;
610 DayZPhysics.
RaycastRV(rayStart, rayEnd, hitPos, hitNormal, hitComponentIndex, hitObjects, NULL, player);
613 if( hitObjects.Count() )
614 target = hitObjects.Get(0);
616 if ( target != NULL && target.IsInherited(
EntityAI) )
636 else if( w == m_PresetItemsTextListbox )
638 m_SelectedObjectIsPreset =
false;
646 m_DamageEditBox.SetText( item_health.
ToString() );
647 m_QuantityEditBox.SetText( item_quantity.ToString() );
652 else if( w == m_UpButton )
657 else if( w == m_DownButton )
662 else if( w == m_WgtBtnLeftPresets )
664 if( m_WgtPnlWrapper.IsVisible() )
666 m_WgtPnlWrapper.Show(
false);
667 m_WgtBtnLeftPresets.SetText(
"Presets >>");
671 m_WgtPnlWrapper.Show(
true);
672 m_WgtBtnLeftPresets.SetText(
"Presets <<");
677 else if ( w == m_PresetAddItemtButton )
682 else if ( w == m_PresetRemoveItemButton )
687 else if ( w == m_WgtBtnPositionManager )
689 m_PopupScriptPositionManager = UIPopupScriptPositionManager.Cast(
PopupOpen( POPUP_ID_POSITION_MANAGER,
Param.Cast( NULL ) ) );
692 else if ( w == m_WgtBtnSceneSettings )
694 PopupOpen(POPUP_ID_SCENE_SETTINGS, NULL);
697 else if ( w == m_SlWgtSelect )
699 row_index = m_SlWgtLbxObjectsList.GetSelectedRow();
701 if ( m_SlObjectsList.Count() > 0 && m_SlObjectsList.Count() > row_index )
703 m_ModuleSceneManager.SelectObject(m_SlObjectsList.GetElement(row_index));
708 else if ( w == m_SlWgtFocus )
710 m_ModuleSceneManager.SelectedObjectFocus();
714 else if ( w == m_WgtBtnSceneSave )
716 m_ModuleSceneManager.SceneSave();
720 else if ( w == m_WgtBtnEditorSettings )
722 PopupOpen(POPUP_ID_EDITOR_SETTINGS, NULL);
726 else if ( w == m_WgtBtnEditInitScript )
733 else if ( w == m_WgtBtnDeleteRuler )
735 m_ModuleSceneManager.RulerDelete();
750 super.OnChange(w,
x,
y, finished);
752 if (w == m_ClWgtEbxFilter)
757 else if (w == m_SlWgtEbxFilter)
762 else if ( w == m_PrWgtPoxX && finished )
764 m_ModuleSceneManager.SelectedObjectSetPosX(m_PrWgtPoxX.GetText().ToFloat());
766 else if ( w == m_PrWgtPoxY && finished )
768 m_ModuleSceneManager.SelectedObjectSetPosY(m_PrWgtPoxY.GetText().ToFloat());
770 else if ( w == m_PrWgtPoxZ && finished )
772 m_ModuleSceneManager.SelectedObjectSetPosZ(m_PrWgtPoxZ.GetText().ToFloat());
774 else if ( w == m_PrWgtDir && finished )
776 m_ModuleSceneManager.SelectedObjectSetRot(m_PrWgtDir.GetText().ToFloat());
779 else if ( w == m_PrWgtDmg && finished )
781 m_ModuleSceneManager.SelectedObjectSetDamage(m_PrWgtDmg.GetText().ToFloat());
784 else if ( w == m_QuantityEditBox )
789 else if ( w == m_DamageEditBox )
815 super.OnMouseWheel(w,
x,
y, wheel);
817 m_ModuleSceneManager.OnMouseWheel(wheel);
827 super.OnItemSelected(w,
x,
y, row, column, oldRow, oldColumn);
829 if ( w == m_ClWgtLbxClassesList )
831 string selected_class_name;
832 m_ClWgtLbxClassesList.GetItemText( m_ClWgtLbxClassesList.GetSelectedRow(), 0, selected_class_name );
833 m_ModuleSceneManager.SelectClassName(selected_class_name);
835 SceneObject obj_selected = m_ModuleSceneManager.GetSelectedSceneObject();
837 m_SelectedObjectIsPreset =
false;
839 else if ( w == m_SlWgtLbxObjectsList )
841 int row_index = m_SlWgtLbxObjectsList.GetSelectedRow();
843 if ( m_SlObjectsList && row_index > -1 && m_SlObjectsList.Count() > 0 && m_SlObjectsList.Count() > row_index )
845 m_ModuleSceneManager.SelectObject(m_SlObjectsList.GetElement(row_index));
849 if( m_PopupScriptPositionManager != NULL )
851 m_PopupScriptPositionManager.OnItemSelected(w,
x,
y, row, column, oldRow, oldColumn);
864 if ( m_OpenedPopups.Count() == 0 )
866 m_WgtPopupsMain.
Show(
true);
867 m_WgtPopupsBg.Show(
true);
871 int popup_curr_id = m_OpenedPopups.Get(m_OpenedPopups.Count() - 1);
872 m_Popups.Get(popup_curr_id).Show(
false);
875 m_OpenedPopups.Insert(popup_id);
890 if ( m_OpenedPopups.Count() > 0 )
892 int popup_curr_id = m_OpenedPopups.Get(m_OpenedPopups.Count() - 1);
894 m_Popups.Get(popup_curr_id).
Show(
false);
895 m_Popups.Get(popup_curr_id).OnClose();
897 m_OpenedPopups.Remove(m_OpenedPopups.Count() - 1);
899 if ( m_OpenedPopups.Count() > 0 )
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);
905 return m_Popups.Get(ppp_id);
909 m_WgtPopupsMain.Show(
false);
910 m_WgtPopupsBg.Show(
false);
920 if ( m_OpenedPopups.Count() > 0 )
922 int popup_curr_id = m_OpenedPopups.Get(m_OpenedPopups.Count() - 1);
924 m_Popups.Get(popup_curr_id).Show(
false);
925 m_Popups.Get(popup_curr_id).OnClose();
927 m_OpenedPopups.Clear();
938 m_WgtRoot.Show( m_ModuleSceneManager.IsOpened() );
949 string pos_x =
"n/a";
950 string pos_y =
"n/a";
951 string pos_z =
"n/a";
956 for (
int i = 0; i < m_PrWidgetsAttachments.Count(); ++i )
958 m_PrWidgetsAttachments.Get(i).Hide();
961 if ( m_ModuleSceneManager.GetSelectedSceneObject() )
963 SceneObject obj = m_ModuleSceneManager.GetSelectedSceneObject();
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);
980 m_PrWgtAttRoot.SetSize(1, prop_root_h);
981 m_PrWgtAttTitle.SetSize(1, line_h);
984 EntityAI e = m_ModuleSceneManager.GetSelectedSceneObject().GetObject();
989 for (
int j = 0; j < attachments_in_slots.Count(); ++j )
991 TStringArray attachments_in_slot = attachments_in_slots.GetElement(j);
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 );
1000 m_WgtBtnEditInitScript.Enable(
true );
1004 m_WgtBtnEditInitScript.Enable(
false );
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);
1014 m_SlWgtLoadedScene.SetText(
"Loaded Scene: "+m_ModuleSceneManager.SceneGetName());
1017 if ( m_ModuleSceneManager.IsRulerActivated() )
1019 m_WgtBtnDeleteRuler.SetColor( 0xFF5DE028 );
1023 m_WgtBtnDeleteRuler.SetColor( 0xFFFFFFFF );
1031 int cmd_id = p.param1;
1035 case PluginSceneManager.SCENE_EDITOR_CMD_REFRESH:
1039 case PluginSceneManager.SCENE_EDITOR_CMD_SAVE:
1040 m_NotifyWgtPanel.SetAlpha(1.0);
1041 m_NotifyFadeTimer.FadeOut(m_NotifyWgtPanel, 2,
true);
1141 m_SlWgtLbxObjectsList.ClearItems();
1144 SceneObject selected_object = m_ModuleSceneManager.GetSelectedSceneObject();
1146 for (
int i = 0; i < m_SlObjectsList.Count(); ++i )
1148 SceneObject scene_obj = m_SlObjectsList.GetElement(i);
1150 if ( selected_object != NULL && selected_object == scene_obj )
1155 m_SlWgtLbxObjectsList.AddItem(scene_obj.
GetTypeName(), NULL, 0);
1158 m_SlWgtLbxObjectsList.SelectRow(row);
1168 m_ClWgtLbxClassesList.ClearItems();
1170 for (
int i = 0; i < m_ClClassesList.Count(); ++i )
1172 m_ClWgtLbxClassesList.AddItem(m_ClClassesList.Get(i), NULL, 0);
1187 if( scene_objects != NULL )
1189 for (
int i=0; i < scene_objects.Count(); ++i )
1197 if ( obj_name.
Contains(search_string))
1199 array_ret.Insert(i, sc_obj);
1221 for (
int s = 0; s < searching_in.Count(); ++s )
1223 string config_path = searching_in.Get(s);
1225 int objects_count =
g_Game.ConfigGetChildrenCount(config_path);
1226 for (
int i = 0; i < objects_count; i++)
1229 g_Game.ConfigGetChildName(config_path, i, childName);
1231 int scope =
g_Game.ConfigGetInt(config_path +
" " + childName +
" scope");
1237 string nchName = childName;
1240 if ( nchName.
Contains(search_string))
1242 array_ret.Insert(childName);
1262 for (
int i = 0; i < m_Popups.Count(); ++i )
1264 m_Popups.Get(i).Show(
false);
1267 m_WgtPopupsMain.Show(
false);
1268 m_WgtPopupsBg.Show(
false);
1276 for (
int i = 0; i < m_Popups.Count(); ++i )
1278 if ( m_Popups.Get(i).OnClick(w,
x,
y, button) )
1284 for (
int j = 0; j < m_PrWidgetsAttachments.Count(); ++j )
1286 if ( m_PrWidgetsAttachments.Get(j).OnClick(w,
x,
y, button) )
1300 for (
int i = 0; i < m_Popups.Count(); ++i )
1302 if ( m_Popups.Get(i).OnChange(w,
x,
y, finished) )
1316 for (
int i = 0; i < m_PrWidgetsAttachments.Count(); ++i )
1327 m_PrWidgetsAttachments.Insert(ui_prop);
1344 for (
int m = 0; m < slots.Count(); ++m )
1353 for (
int s = 0; s < searching_in.Count(); ++s )
1355 string config_path = searching_in.Get(s);
1357 int objects_count =
g_Game.ConfigGetChildrenCount(config_path);
1358 for (
int i = 0; i < objects_count; i++)
1360 g_Game.ConfigGetChildName(config_path, i, childName);
1362 g_Game.ConfigGetTextArray(config_path +
" " + childName +
" inventorySlot", inv_slots);
1364 if ( inv_slots.Count() > 0 )
1366 for (
int j = 0; j < inv_slots.Count(); ++j )
1369 inv_slot = inv_slots.Get(j);
1371 for (
int k = 0; k < slots.Count(); ++k )
1373 string finding_slot_type = slots.Get(k);
1375 if ( inv_slot == finding_slot_type )
1377 array_ret.Get(finding_slot_type).Insert(childName);
1385 g_Game.ConfigGetText(config_path +
" " + childName +
" inventorySlot", inv_slot);
1387 if ( inv_slot !=
"" )
1389 for (
int l = 0; l < slots.Count(); ++l )
1391 string finding_slot_type_2 = slots.Get(l);
1393 if ( inv_slot == finding_slot_type_2 )
1395 array_ret.Get(finding_slot_type_2).Insert(childName);
class OptionSelectorMultistate extends OptionSelector class_name
PluginConfigDebugProfile m_ConfigDebugProfile
PluginBase GetPlugin(typename plugin_type)
bool IsModuleExist(typename plugin_type)
Param3< string, bool, bool > PresetParams
proto native vector GetCurrentCameraDirection()
proto native Mission GetMission()
proto native void CopyToClipboard(string text)
proto native DayZPlayer GetPlayer()
proto native vector GetCurrentCameraPosition()
proto native WorkspaceWidget GetWorkspace()
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.
void AddActiveInputExcludes(array< string > excludes)
void RemoveActiveInputExcludes(array< string > excludes, bool bForceSupress=false)
deprecated
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
TStringArray GetConfigAttachments()
void SetPos(float x, float y)
void Show(EntityAI e, string slot_name, TStringArray att_items)
void SetSize(float width, float height)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto string ToString(bool beautify=true)
Vector to string.
proto native CGame GetGame()
array< string > TStringArray
bool Contains(string sample)
Returns true if sample is substring of string.
proto int ToLower()
Changes string to lowercase. Returns length.