369 layoutRoot =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/scene_editor/day_z_scene_editor.layout");
370 m_WgtPnlWrapper = layoutRoot.FindAnyWidget(
"pnl_presets_wrapper_outer");
371 m_SlWgtLoadedScene =
TextWidget.Cast(layoutRoot.FindAnyWidget(
"txt_left_label_loaded_scene"));
373 m_SlWgtLbxObjectsList =
TextListboxWidget.Cast(layoutRoot.FindAnyWidget(
"txtlist_left_items"));
375 m_SlWgtEbxFilter =
EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"edit_left_search_item"));
377 m_SlWgtSelect =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_left_select"));
378 m_SlWgtFocus =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_left_focus"));
380 m_WgtPopupsMain = layoutRoot.FindAnyWidget(
"pnl_popups");
382 m_WgtPopupsBg = layoutRoot.FindAnyWidget(
"pnl_popup_bg");
384 m_ClWgtEbxFilter =
EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"edit_left_search_class"));
386 m_ClWgtLbxClassesList =
TextListboxWidget.Cast(layoutRoot.FindAnyWidget(
"txtlist_left_classes"));
388 m_WgtBtnSceneManager =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_top_scene_manager"));
389 m_WgtBtnPositionManager =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_top_position_manager"));
390 m_WgtBtnSceneSettings =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_top_settings"));
391 m_ClWgtButtonAddAtt =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_left_cl_add_attachment"));
392 m_WgtBtnSceneSave =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_top_save_scene"));
393 m_WgtBtnEditorSettings =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_top_editor_settings"));
394 m_WgtBtnEditInitScript =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_right_prop_pos_iscr_value"));
395 m_WgtBtnDeleteRuler =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_delete_ruler"));
396 m_WgtBtnLeftPresets =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_left_presets"));
399 m_PrWgtClassName =
TextWidget.Cast(layoutRoot.FindAnyWidget(
"txt_right_prop_class_value"));
400 m_PrWgtPoxX =
EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"ebx_right_prop_pos_x_value"));
401 m_PrWgtPoxY =
EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"ebx_right_prop_pos_y_value"));
402 m_PrWgtPoxZ =
EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"ebx_right_prop_pos_z_value"));
403 m_PrWgtDir =
EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"ebx_right_prop_pos_dir_value"));
404 m_PrWgtDmg =
EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"ebx_right_prop_pos_hlt_value"));
405 m_PrWgtAttRoot = layoutRoot.FindAnyWidget(
"pnl_right_inspector_attachments");
406 m_PrWgtAttTitle = layoutRoot.FindAnyWidget(
"pnl_att_title");
410 m_NotifyWgtPanel = layoutRoot.FindAnyWidget(
"pnl_notify");
411 m_NotifyWgtPanel.SetAlpha(0.0);
412 m_NotifyFadeTimer =
new WidgetFadeTimer;
415 m_Popups.Insert(POPUP_ID_SCENE_MANAGER,
new UIPopupScriptSceneManager(layoutRoot.FindAnyWidget(
"pnl_popup_scene_manager")));
416 m_Popups.Insert(POPUP_ID_POSITION_MANAGER,
new UIPopupScriptPositionManager(layoutRoot.FindAnyWidget(
"pnl_popup_position_manager")));
417 m_Popups.Insert(POPUP_ID_SCENE_SETTINGS,
new UIPopupScriptSceneSettings(layoutRoot.FindAnyWidget(
"pnl_popup_settings")));
418 m_Popups.Insert(POPUP_ID_SCENE_NEW,
new UIPopupScriptSceneNew(layoutRoot.FindAnyWidget(
"pnl_popup_scene_new")));
419 m_Popups.Insert(POPUP_ID_SCENE_RENAME,
new UIPopupScriptSceneRename(layoutRoot.FindAnyWidget(
"pnl_popup_scene_rename")));
420 m_Popups.Insert(POPUP_ID_SCENE_DELETE,
new UIPopupScriptSceneDelete(layoutRoot.FindAnyWidget(
"pnl_popup_scene_delete")));
421 m_Popups.Insert(POPUP_ID_NOTIFY,
new UIPopupScriptNotify(layoutRoot.FindAnyWidget(
"pnl_popup_notify")));
422 m_Popups.Insert(POPUP_ID_EDITOR_SETTINGS,
new UIPopupScriptEditorSettings(layoutRoot.FindAnyWidget(
"pnl_popup_editor_settings")));
423 m_Popups.Insert(POPUP_ID_INIT_SCRIPT,
new UIPopupScriptInitScript(layoutRoot.FindAnyWidget(
"pnl_popup_init_script")));
424 m_Popups.Insert(POPUP_ID_PRESET_NEW,
new UIPopupScriptPresetNew(layoutRoot.FindAnyWidget(
"pnl_popup_preset_new")));
425 m_Popups.Insert(POPUP_ID_PRESET_RENAME,
new UIPopupScriptPresetRename(layoutRoot.FindAnyWidget(
"pnl_popup_preset_rename")));
426 m_Popups.Insert(POPUP_ID_CONFIGS,
new UIPopupScriptConfigs(layoutRoot.FindAnyWidget(
"pnl_popup_configs")));
428 m_PresetsTextListbox =
TextListboxWidget.Cast(layoutRoot.FindAnyWidget(
"pnl_presets"));
429 m_PresetItemsTextListbox =
TextListboxWidget.Cast(layoutRoot.FindAnyWidget(
"pnl_preset_items"));
430 m_ConfigDebugProfileFixed = PluginConfigDebugProfileFixed.Cast(
GetPlugin(PluginConfigDebugProfileFixed));
432 m_PresetAddItemtButton =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_add_to_preset"));
433 m_PresetRemoveItemButton =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_remove_from_preset"));
434 m_SpawnOnGroundButton =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_spawn_on_ground"));
435 m_SpawnInInventoryButton =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_spawn_in_inventory"));
436 m_SpawnAsAttachmentButton =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_spawn_as_attachment"));
437 m_UpButton =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_up"));
438 m_DownButton =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_down"));
439 m_Developer = PluginDeveloper.Cast(
GetPlugin(PluginDeveloper));
440 m_QuantityEditBox =
EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"txt_quantity_value"));
441 m_DamageEditBox =
EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"txt_damage_value"));
442 m_SpawnDistanceEditBox =
EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"txt_distance_value"));
443 m_PresetNewButton =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_new"));
444 m_PresetDeleteButton =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_delete"));
445 m_PresetRenameButton =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_rename"));
446 m_PresetSetDefaultButton =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_default"));
447 m_CopyToClipboardButton =
ButtonWidget.Cast(layoutRoot.FindAnyWidget(
"btn_copy_to_clipboard"));
448 m_ConfigsButton =
EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"btn_top_configs"));
497 if (
w == m_WgtBtnSceneManager)
503 else if (
w == m_ConfigsButton)
508 else if (
w == m_PresetsTextListbox)
511 m_SelectedObjectIsPreset =
true;
515 else if (
w == m_PresetSetDefaultButton)
521 else if (
w == m_PresetNewButton)
527 else if (
w == m_PresetRenameButton)
532 else if (
w == m_CopyToClipboardButton)
537 else if (
w == m_PresetDeleteButton)
543 else if (
w == m_SpawnOnGroundButton ||
w == m_SpawnAsAttachmentButton ||
w == m_SpawnInInventoryButton)
547 float distance = m_SpawnDistanceEditBox.GetText().ToFloat();
560 if (m_SelectedObjectIsPreset)
604 else if (
w == m_PresetItemsTextListbox)
606 m_SelectedObjectIsPreset =
false;
620 else if (
w == m_UpButton)
625 else if (
w == m_DownButton)
630 else if (
w == m_WgtBtnLeftPresets)
632 if (m_WgtPnlWrapper.IsVisible())
634 m_WgtPnlWrapper.Show(
false);
635 m_WgtBtnLeftPresets.SetText(
"Presets >>");
639 m_WgtPnlWrapper.Show(
true);
640 m_WgtBtnLeftPresets.SetText(
"Presets <<");
645 else if (
w == m_PresetAddItemtButton)
650 else if (
w == m_PresetRemoveItemButton)
655 else if (
w == m_WgtBtnPositionManager)
657 m_PopupScriptPositionManager = UIPopupScriptPositionManager.Cast(
PopupOpen(POPUP_ID_POSITION_MANAGER,
Param.Cast(
NULL)));
660 else if (
w == m_WgtBtnSceneSettings)
665 else if (
w == m_SlWgtSelect)
667 row_index = m_SlWgtLbxObjectsList.GetSelectedRow();
669 if (m_SlObjectsList.Count() > 0 && m_SlObjectsList.Count() >
row_index)
670 m_ModuleSceneManager.SelectObject(m_SlObjectsList.GetElement(
row_index));
674 else if (
w == m_SlWgtFocus)
676 m_ModuleSceneManager.SelectedObjectFocus();
680 else if (
w == m_WgtBtnSceneSave)
682 m_ModuleSceneManager.SceneSave();
686 else if (
w == m_WgtBtnEditorSettings)
692 else if (
w == m_WgtBtnEditInitScript)
699 else if (
w == m_WgtBtnDeleteRuler)
701 m_ModuleSceneManager.RulerDelete();
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.