public override void OnInspectorGUI() { BPhysicsWorld pw = (BPhysicsWorld)target; //pw.doCollisionCallbacks = EditorGUILayout.Toggle("Do Collision Callbacks", pw.doCollisionCallbacks); pw.DoDebugDraw = EditorGUILayout.Toggle(gcDoDebugDraw, pw.DoDebugDraw); pw.DebugDrawMode = (BulletSharp.DebugDrawModes)EditorGUILayout.EnumFlagsField(DebugDrawMode, pw.DebugDrawMode); pw.worldType = (BPhysicsWorld.WorldType)EditorGUILayout.EnumPopup("World Type", pw.worldType); EditorGUILayout.Separator(); pw.gravity = EditorGUILayout.Vector3Field("Gravity", pw.gravity); EditorGUILayout.Separator(); pw.collisionType = (BPhysicsWorld.CollisionConfType)EditorGUILayout.EnumPopup("Collision Type", pw.collisionType); pw.broadphaseType = (BPhysicsWorld.BroadphaseType)EditorGUILayout.EnumPopup("Broadphase Algorithm", pw.broadphaseType); pw.axis3SweepBroadphaseMin = EditorGUILayout.Vector3Field("Broadphase Axis 3 Sweep Min", pw.axis3SweepBroadphaseMin); pw.axis3SweepBroadphaseMax = EditorGUILayout.Vector3Field("Broadphase Axis 3 Sweep Max", pw.axis3SweepBroadphaseMax); pw.debugType = EditorInterface.DrawDebug(pw.debugType, pw); if (GUI.changed) { EditorUtility.SetDirty(pw); EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene()); Undo.RecordObject(pw, "Undo Physics World"); } }
protected override void OnLoadFinish() { pool = new LogPool(); logList = new List <LogMetaInfo>(); logTemplate = panel.transform.Find("ScrollView/Viewport/Content/ItemTemplate").gameObject; scrollRect = panel.transform.Find("ScrollView").GetComponent <ScrollRect>(); logTemplate.SetActive(false); btnClear = panel.transform.Find("BtnClear").gameObject; btnClear.GetComponent <Button>().onClick.AddListener(() => { ClearAllLogs(); }); btnCopy = panel.transform.Find("BtnCopy").GetComponent <Button>(); btnCopy.onClick.AddListener(() => { StringBuilder builder = new StringBuilder(); foreach (var info in logList) { builder.AppendLine(info.info); } EditorInterface.CopyToClipboard(builder.ToString()); }); this.cache.AddTemplate(TEMPLATE_ITEM_STR, logTemplate); Application.logMessageReceived += OnLog; }
public void ShouldReturnTrueWhenUpdatingEditorInterface() { var baseEditorInterface = new EditorInterface { Controls = new List <EditorInterfaceControl>() }; var newEditorInterface = CreateDefaultNewEditorInterface(); var definition = new ContentTypeDefinition(null, newEditorInterface); baseEditorInterface.Controls.AddRange(new List <EditorInterfaceControl> { new EditorInterfaceControl { FieldId = "EditorField1", WidgetId = "OldWidgetId1" }, new EditorInterfaceControl { FieldId = "EditorField2", WidgetId = "OldWidgetId2" } }); Assert.True(definition.Update(baseEditorInterface)); for (var i = 0; i < baseEditorInterface.Controls.Count; i++) { Assert.Equal(definition.InferredEditorInterface.Controls[i].FieldId, baseEditorInterface.Controls[i].FieldId); Assert.Equal(definition.InferredEditorInterface.Controls[i].WidgetId, baseEditorInterface.Controls[i].WidgetId); } }
private void setCurrentEditor(Control item) { if (item != null && editor != null) { // same node? if (editor is EditorInterface && item is EditorInterface) { EditorInterface a = (EditorInterface)editor; EditorInterface b = (EditorInterface)item; if (a.getNode() == b.getNode()) { return; } } } if (item == null) { return; } killCurrentEditor(); editor = item; item.AutoSize = true; item.Dock = System.Windows.Forms.DockStyle.Fill; this.splitContainer1.Panel2.Controls.Add(item); }
public PathGizmo(CustomPathEditorPlugin plugin, PathGizmoPlugin gizmoPlug, EditorInterface editor, CustomPath path) { this.editor = editor; this.path = path; this.plugin = plugin; gizmoPlugin = gizmoPlug; }
public void ShouldReturnFalseWhenUpdatingSameOrIncorrectEditorInterfaces(List <EditorInterfaceControl> controls) { var baseEditorInterface = new EditorInterface(); var newEditorInterface = CreateDefaultNewEditorInterface(); var definition = new ContentTypeDefinition(null, newEditorInterface); baseEditorInterface.Controls = controls; Assert.False(definition.Update(baseEditorInterface)); }
public PathGizmoPlugin(CustomPathEditorPlugin plugin, EditorInterface editor) { this.editor = editor; this.plugin = plugin; object pathCol = editor.GetEditorSettings().GetSetting("editors/3d_gizmos/gizmo_colors/path"); Color pathColor = new Color(0.5f, 0.5f, 1.0f, 0.8f); if (pathCol is Color col) { pathColor = col; } CreateMaterial("path_material", pathColor); CreateMaterial("path_thin_material", new Color(pathColor.r, pathColor.g, pathColor.b, 0.5f)); CreateHandleMaterial("handles"); }
protected override void OnLoadFinish() { pool = new NetPool(); logList = new List <NetMetaInfo>(); logTemplate = panel.transform.Find("ScrollView/Viewport/Content/ItemTemplate").gameObject; scrollRect = panel.transform.Find("ScrollView").GetComponent <ScrollRect>(); logTemplate.SetActive(false); btnClear = panel.transform.Find("BtnClear").gameObject; btnClear.GetComponent <Button>().onClick.AddListener(() => { ClearAllLogs(); }); btnStart = panel.transform.Find("BtnStart").gameObject; btnStart.GetComponent <Button>().onClick.AddListener(() => { StartLog(); }); btnStop = panel.transform.Find("BtnStop").gameObject; btnStop.GetComponent <Button>().onClick.AddListener(() => { StopLog(); }); btnCopy = panel.transform.Find("BtnCopy").GetComponent <Button>(); btnCopy.onClick.AddListener(() => { StringBuilder builder = new StringBuilder(); foreach (var info in logList) { builder.AppendLine(GetPrintStr(info)); } EditorInterface.CopyToClipboard(builder.ToString()); }); recording = panel.transform.Find("Recording").GetComponent <Image>(); this.cache.AddTemplate(TEMPLATE_ITEM_STR, logTemplate); }
private static EditorInterface CreateDefaultNewEditorInterface() { var editor = new EditorInterface { Controls = new List <EditorInterfaceControl>() }; editor.Controls.AddRange(new List <EditorInterfaceControl> { new EditorInterfaceControl { FieldId = "EditorField1", WidgetId = "NewWidgetId1" }, new EditorInterfaceControl { FieldId = "EditorField2", WidgetId = "NewWidgetId2" } }); return(editor); }
public bool Update(EditorInterface editorInterface) { // // Cannot add or remove controls (they always have to match content type fields) - use Join not GroupJoin // var matchedControls = editorInterface.Controls.Join(InferredEditorInterface.Controls, infered => infered.FieldId, existing => existing.FieldId, (i, e) => new { Existing = i, Updated = e }); var modified = false; foreach (var match in matchedControls) { if (string.IsNullOrEmpty(match.Updated.WidgetId) == false && match.Existing.WidgetId != match.Updated.WidgetId) { match.Existing.WidgetId = match.Updated.WidgetId; modified = true; } } return(modified); }
public override void _Ready() { base._Ready(); editorInterface = GodotSharpEditor.Instance.GetEditorInterface(); var editorBaseControl = editorInterface.GetBaseControl(); SizeFlagsVertical = (int)SizeFlags.ExpandFill; SetAnchorsAndMarginsPreset(LayoutPreset.Wide); panelTabs = new TabContainer { TabAlign = TabContainer.TabAlignEnum.Left, RectMinSize = new Vector2(0, 228) * EditorScale, SizeFlagsVertical = (int)SizeFlags.ExpandFill }; panelTabs.AddStyleboxOverride("panel", editorBaseControl.GetStylebox("DebuggerPanel", "EditorStyles")); panelTabs.AddStyleboxOverride("tab_fg", editorBaseControl.GetStylebox("DebuggerTabFG", "EditorStyles")); panelTabs.AddStyleboxOverride("tab_bg", editorBaseControl.GetStylebox("DebuggerTabBG", "EditorStyles")); AddChild(panelTabs); { // Builds tab panelBuildsTab = new VBoxContainer { Name = "Builds".TTR(), SizeFlagsHorizontal = (int)SizeFlags.ExpandFill }; panelTabs.AddChild(panelBuildsTab); var toolBarHBox = new HBoxContainer { SizeFlagsHorizontal = (int)SizeFlags.ExpandFill }; panelBuildsTab.AddChild(toolBarHBox); var buildProjectBtn = new Button { Text = "Build Project".TTR(), FocusMode = FocusModeEnum.None }; buildProjectBtn.Connect("pressed", this, nameof(BuildProjectPressed)); toolBarHBox.AddChild(buildProjectBtn); toolBarHBox.AddSpacer(begin: false); warningsBtn = new ToolButton { Text = "Warnings".TTR(), ToggleMode = true, Pressed = true, Visible = false, FocusMode = FocusModeEnum.None }; warningsBtn.Connect("toggled", this, nameof(_WarningsToggled)); toolBarHBox.AddChild(warningsBtn); errorsBtn = new ToolButton { Text = "Errors".TTR(), ToggleMode = true, Pressed = true, Visible = false, FocusMode = FocusModeEnum.None }; errorsBtn.Connect("toggled", this, nameof(_ErrorsToggled)); toolBarHBox.AddChild(errorsBtn); toolBarHBox.AddSpacer(begin: false); viewLogBtn = new Button { Text = "View log".TTR(), FocusMode = FocusModeEnum.None, Visible = false }; viewLogBtn.Connect("pressed", this, nameof(_ViewLogPressed)); toolBarHBox.AddChild(viewLogBtn); var hsc = new HSplitContainer { SizeFlagsHorizontal = (int)SizeFlags.ExpandFill, SizeFlagsVertical = (int)SizeFlags.ExpandFill }; panelBuildsTab.AddChild(hsc); buildTabsList = new ItemList { SizeFlagsHorizontal = (int)SizeFlags.ExpandFill }; buildTabsList.Connect("item_selected", this, nameof(_BuildTabsItemSelected)); buildTabsList.Connect("nothing_selected", this, nameof(_BuildTabsNothingSelected)); hsc.AddChild(buildTabsList); buildTabs = new TabContainer { TabAlign = TabContainer.TabAlignEnum.Left, SizeFlagsHorizontal = (int)SizeFlags.ExpandFill, TabsVisible = false }; hsc.AddChild(buildTabs); } }
public override void OnInspectorGUI() { EditorGUILayout.LabelField("Collision", EditorStyles.boldLabel); BulletSharp.CollisionFlags collisionFlags; BulletSharp.CollisionFilterGroups groupsIBelongTo; BulletSharp.CollisionFilterGroups collisionMask; float mass; Vector3 linearFactor; Vector3 angularFactor; float friction; float rollingFriction; float linearDamping; float angularDamping; bool additionalDamping; float additionalDampingFactor = 0f; float additionalLinearDampingThresholdSqr = 0f; float additionalAngularDampingThresholdSqr = 0f; float additionalAngularDampingFactor = 0f; float restitution; float linearSleepingThreshold; float angularSleepingThreshold; collisionFlags = BCollisionObjectEditor.RenderEnumMaskCollisionFlagsField(BCollisionObjectEditor.gcCollisionFlags, rb.collisionFlags); groupsIBelongTo = BCollisionObjectEditor.RenderEnumMaskCollisionFilterGroupsField(BCollisionObjectEditor.gcGroupsIBelongTo, rb.groupsIBelongTo); collisionMask = BCollisionObjectEditor.RenderEnumMaskCollisionFilterGroupsField(BCollisionObjectEditor.gcCollisionMask, rb.collisionMask); EditorGUILayout.Separator(); EditorGUILayout.LabelField("Object", EditorStyles.boldLabel); mass = EditorInterface.Layout.DrawFloat("Mass", rb.mass, rb); EditorGUILayout.Separator(); EditorGUILayout.LabelField("Limits", EditorStyles.boldLabel); linearFactor = EditorInterface.Layout.DrawVector3("Linear Factor", rb.linearFactor, rb); angularFactor = EditorInterface.Layout.DrawVector3("Angular Factor", rb.angularFactor, rb); EditorGUILayout.Separator(); EditorGUILayout.LabelField("Friction", EditorStyles.boldLabel); friction = EditorInterface.Layout.DrawFloat("Friction", rb.friction, rb); rollingFriction = EditorInterface.Layout.DrawFloat("Rolling Friction", rb.rollingFriction, rb); EditorGUILayout.Separator(); EditorGUILayout.LabelField("Damping", EditorStyles.boldLabel); linearDamping = EditorInterface.Layout.DrawFloat("Linear Damping", rb.linearDamping, rb); angularDamping = EditorInterface.Layout.DrawFloat("Angular Damping", rb.angularDamping, rb); additionalDamping = EditorInterface.Layout.DrawToggle("Additional Damping", rb.additionalDamping, rb); if (additionalDamping) { additionalDampingFactor = EditorInterface.Layout.DrawFloat("Additional Damping Factor", rb.additionalDampingFactor, rb); additionalLinearDampingThresholdSqr = EditorInterface.Layout.DrawFloat("Additional Linear Damping Threshold Sqr", rb.additionalLinearDampingThresholdSqr, rb); additionalAngularDampingThresholdSqr = EditorInterface.Layout.DrawFloat("Additional Angular Damping Threshold Sqr", rb.additionalAngularDampingThresholdSqr, rb); additionalAngularDampingFactor = EditorInterface.Layout.DrawFloat("Additional Angular Damping Factor", rb.additionalAngularDampingFactor, rb); } EditorGUILayout.Separator(); EditorGUILayout.LabelField("Other Settings", EditorStyles.boldLabel); restitution = EditorInterface.Layout.DrawFloat("Restitution", rb.restitution, rb); linearSleepingThreshold = EditorInterface.Layout.DrawFloat("Linear Sleeping Threshold", rb.linearSleepingThreshold, rb); angularSleepingThreshold = EditorInterface.Layout.DrawFloat("Angular Sleeping Threshold", rb.angularSleepingThreshold, rb); EditorGUILayout.Separator(); rb.debugType = EditorInterface.DrawDebug(rb.debugType, rb); if (rb.debugType != 0) { EditorGUILayout.LabelField(string.Format("Velocity {0}", rb.velocity)); EditorGUILayout.LabelField(string.Format("Angular Velocity {0}", rb.angularVelocity)); } if (GUI.changed) { rb.collisionFlags = collisionFlags; rb.groupsIBelongTo = groupsIBelongTo; rb.collisionMask = collisionMask; rb.mass = mass; rb.linearFactor = linearFactor; rb.angularFactor = angularFactor; rb.friction = friction; rb.rollingFriction = rollingFriction; rb.linearDamping = linearDamping; rb.angularDamping = angularDamping; rb.additionalDamping = additionalDamping; if (additionalDamping) { rb.additionalDampingFactor = additionalDampingFactor; rb.additionalLinearDampingThresholdSqr = additionalLinearDampingThresholdSqr; rb.additionalAngularDampingThresholdSqr = additionalAngularDampingThresholdSqr; rb.additionalAngularDampingFactor = additionalAngularDampingFactor; } rb.restitution = restitution; rb.linearSleepingThreshold = linearSleepingThreshold; rb.angularSleepingThreshold = angularSleepingThreshold; serializedObject.ApplyModifiedProperties(); EditorUtility.SetDirty(rb); EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene()); Repaint(); } }
public override void OnInspectorGUI() { BCollisionShape collisionShape; BulletSharp.CollisionFlags collisionFlags; BulletSharp.CollisionFilterGroups groupsIBelongTo; BulletSharp.CollisionFilterGroups collisionMask; BulletSharp.ActivationState activationState; float mass; Vector3 linearFactor; Vector3 angularFactor; float friction; float rollingFriction; float linearDamping; float angularDamping; bool additionalDamping; float additionalDampingFactor = 0f; float additionalLinearDampingThresholdSqr = 0f; float additionalAngularDampingThresholdSqr = 0f; float additionalAngularDampingFactor = 0f; float restitution; float linearSleepingThreshold; float angularSleepingThreshold; EditorGUILayout.LabelField("Collision", EditorStyles.boldLabel); //byte tickPriority = (byte)EditorGUILayout.IntField("Tick Priority", rb.tickPriority); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Collision Shape"); collisionShape = (BCollisionShape)EditorGUILayout.ObjectField(rb.collisionShape, typeof(BCollisionShape), true); EditorGUILayout.EndHorizontal(); collisionFlags = BCollisionObjectEditor.RenderEnumMaskCollisionFlagsField(BCollisionObjectEditor.gcCollisionFlags, rb.collisionFlags); groupsIBelongTo = BCollisionObjectEditor.RenderEnumMaskCollisionFilterGroupsField(BCollisionObjectEditor.gcGroupsIBelongTo, rb.groupsIBelongTo); collisionMask = BCollisionObjectEditor.RenderEnumMaskCollisionFilterGroupsField(BCollisionObjectEditor.gcCollisionMask, rb.collisionMask); activationState = (BulletSharp.ActivationState)EditorGUILayout.EnumPopup(BCollisionObjectEditor.gcActivationState, rb.activationState); EditorGUILayout.Separator(); EditorGUILayout.LabelField("Object", EditorStyles.boldLabel); mass = EditorInterface.Layout.DrawFloat("Mass", rb.mass, rb); EditorGUILayout.Separator(); EditorGUILayout.LabelField("Limits", EditorStyles.boldLabel); linearFactor = EditorInterface.Layout.DrawVector3("Linear Factor", rb.linearFactor, rb); angularFactor = EditorInterface.Layout.DrawVector3("Angular Factor", rb.angularFactor, rb); EditorGUILayout.Separator(); EditorGUILayout.LabelField("Friction", EditorStyles.boldLabel); friction = EditorInterface.Layout.DrawFloat("Friction", rb.friction, rb); rollingFriction = EditorInterface.Layout.DrawFloat("Rolling Friction", rb.rollingFriction, rb); EditorGUILayout.Separator(); EditorGUILayout.LabelField("Damping", EditorStyles.boldLabel); linearDamping = EditorInterface.Layout.DrawFloat("Linear Damping", rb.linearDamping, rb); angularDamping = EditorInterface.Layout.DrawFloat("Angular Damping", rb.angularDamping, rb); additionalDamping = EditorInterface.Layout.DrawToggle("Additional Damping", rb.additionalDamping, rb); if (additionalDamping) { additionalDampingFactor = EditorInterface.Layout.DrawFloat("Additional Damping Factor", rb.additionalDampingFactor, rb); additionalLinearDampingThresholdSqr = EditorInterface.Layout.DrawFloat("Additional Linear Damping Threshold Sqr", rb.additionalLinearDampingThresholdSqr, rb); additionalAngularDampingThresholdSqr = EditorInterface.Layout.DrawFloat("Additional Angular Damping Threshold Sqr", rb.additionalAngularDampingThresholdSqr, rb); additionalAngularDampingFactor = EditorInterface.Layout.DrawFloat("Additional Angular Damping Factor", rb.additionalAngularDampingFactor, rb); } EditorGUILayout.Separator(); EditorGUILayout.LabelField("Other Settings", EditorStyles.boldLabel); restitution = EditorInterface.Layout.DrawFloat("Restitution", rb.restitution, rb); linearSleepingThreshold = EditorInterface.Layout.DrawFloat("Linear Sleeping Threshold", rb.linearSleepingThreshold, rb); angularSleepingThreshold = EditorInterface.Layout.DrawFloat("Angular Sleeping Threshold", rb.angularSleepingThreshold, rb); EditorGUILayout.Separator(); rb.debugType = EditorInterface.DrawDebug(rb.debugType, rb); if (rb.debugType != 0) { EditorGUILayout.LabelField($"Velocity {rb.velocity}"); EditorGUILayout.LabelField($"Angular Velocity {rb.angularVelocity}"); } if (GUI.changed) { //rb.tickPriority = tickPriority; rb.collisionShape = collisionShape; rb.collisionFlags = collisionFlags; rb.groupsIBelongTo = groupsIBelongTo; rb.collisionMask = collisionMask; rb.activationState = activationState; rb.mass = mass; rb.linearFactor = linearFactor; rb.angularFactor = angularFactor; rb.friction = friction; rb.rollingFriction = rollingFriction; rb.linearDamping = linearDamping; rb.angularDamping = angularDamping; rb.additionalDamping = additionalDamping; if (additionalDamping) { rb.additionalDampingFactor = additionalDampingFactor; rb.additionalLinearDampingThresholdSqr = additionalLinearDampingThresholdSqr; rb.additionalAngularDampingThresholdSqr = additionalAngularDampingThresholdSqr; rb.additionalAngularDampingFactor = additionalAngularDampingFactor; } rb.restitution = restitution; rb.linearSleepingThreshold = linearSleepingThreshold; rb.angularSleepingThreshold = angularSleepingThreshold; serializedObject.ApplyModifiedProperties(); EditorUtility.SetDirty(rb); EditorSceneManager.MarkSceneDirty(SceneManager.GetActiveScene()); Repaint(); } }
public override void _EnterTree() { path = null; editor = GetEditorInterface(); baseControl = editor.GetBaseControl(); AddCustomType("Custom3DPath", "Spatial", GD.Load("res://addons/fabianlc_better3d_path/CustomPath.cs") as Script , GD.Load("res://addons/fabianlc_better3d_path/Path3D.svg") as Texture); mirrorHandleAngle = true; mirrorHandleLength = true; gizmoPlugin = new PathGizmoPlugin(this, editor); AddSpatialGizmoPlugin(gizmoPlugin); sep = new VSeparator(); sep.Hide(); AddControlToContainer(CustomControlContainer.SpatialEditorMenu, sep); curveEdit = new ToolButton(); curveEdit.Icon = baseControl.GetIcon("CurveEdit", "EditorIcons"); curveEdit.ToggleMode = true; curveEdit.Hide(); curveEdit.FocusMode = Control.FocusModeEnum.None; curveEdit.HintTooltip = (("Select Points") + "\n" + ("Shift+Drag: Select Control Points") + "\n" + "KEY_CMD" + ("Click: Add Point") + "\n" + ("Right Click: Delete Point")); AddControlToContainer(CustomControlContainer.SpatialEditorMenu, curveEdit); curveCreate = new ToolButton(); curveCreate.Icon = baseControl.GetIcon("CurveCreate", "EditorIcons"); curveCreate.ToggleMode = true; curveCreate.Hide(); curveCreate.FocusMode = Control.FocusModeEnum.None;; curveCreate.HintTooltip = (("Add Point (in empty space)") + "\n" + ("Split Segment (in curve)")); AddControlToContainer(CustomControlContainer.SpatialEditorMenu, curveCreate); curveDel = new ToolButton(); curveDel.Icon = baseControl.GetIcon("CurveDelete", "EditorIcons"); curveDel.ToggleMode = true; curveDel.Hide(); curveDel.FocusMode = Control.FocusModeEnum.None;; curveDel.HintTooltip = (("Delete Point")); AddControlToContainer(CustomControlContainer.SpatialEditorMenu, curveDel); curveClose = new ToolButton(); curveClose.Icon = baseControl.GetIcon("CurveClose", "EditorIcons"); curveClose.Hide(); curveClose.FocusMode = Control.FocusModeEnum.None;; curveClose.HintTooltip = (("Close Curve")); AddControlToContainer(CustomControlContainer.SpatialEditorMenu, curveClose); PopupMenu menu; handleMenu = new MenuButton(); handleMenu.Text = (("Options")); handleMenu.Hide(); AddControlToContainer(CustomControlContainer.SpatialEditorMenu, handleMenu); menu = handleMenu.GetPopup(); menu.AddCheckItem("Mirror Handle Angles"); menu.SetItemChecked((int)Options.Angle, mirrorHandleAngle); menu.AddCheckItem("Mirror Handle Lengths"); menu.SetItemChecked((int)Options.Length, mirrorHandleLength); menu.AddCheckItem("Enable Snap", (int)Options.DoSnap); menu.SetItemChecked((int)Options.DoSnap, snapEnabled); menu.AddItem("Configure snap", (int)Options.ConfigureSnap); menu.AddCheckItem("Lock X", (int)Options.LockX); menu.SetItemChecked((int)Options.LockX, lockX); menu.AddCheckItem("Lock Y", (int)Options.LockY); menu.SetItemChecked((int)Options.LockY, lockY); menu.AddCheckItem("Lock Z", (int)Options.LockZ); menu.SetItemChecked((int)Options.LockZ, lockZ); menu.Connect("id_pressed", this, nameof(HandleOptionPressed)); curveEdit.Pressed = (true); curveCreate.Connect("pressed", this, "_ModeChanged", new Godot.Collections.Array { 0 }); curveEdit.Connect("pressed", this, "_ModeChanged", new Godot.Collections.Array { 1 }); curveDel.Connect("pressed", this, "_ModeChanged", new Godot.Collections.Array { 2 }); curveClose.Connect("pressed", this, "_CloseCurve"); }
public ContentTypeDefinition(ContentType inferredContentType, EditorInterface inferredEditorInterface) { InferredContentType = inferredContentType; InferredEditorInterface = inferredEditorInterface; }