public void Update() { if (GUI.Manager.NativeManager.Begin("DebugMenu", opened)) { if (GUI.Manager.NativeManager.Button("About")) { var messageBox = new GUI.Dialog.About(); messageBox.Show(); } if (GUI.Manager.NativeManager.Button("MessageBox")) { var messageBox = new GUI.Dialog.MessageBox(); messageBox.Show("Title", "Message"); } if (GUI.Manager.NativeManager.Button("NodeTreeView")) { var nodeTreeView = new GUI.Dock.NodeTreeView(); nodeTreeView.Renew(); GUI.Manager.AddControl(nodeTreeView); } } GUI.Manager.NativeManager.End(); }
public static bool Initialize(int width, int height) { var mgr = new swig.GUIManager(); if (mgr.Initialize("Effekseer", 960, 540, false)) { } else { mgr.Dispose(); mgr = null; return(false); } Native = new swig.Native(); Viewer = new Viewer(Native); if (!Viewer.ShowViewer(mgr.GetNativeHandle(), 960, 540, true)) { mgr.Dispose(); mgr = null; return(false); } NativeManager = mgr; // Load font NativeManager.AddFontFromFileTTF("resources/GenShinGothic-Monospace-Normal.ttf", 16); // Add controls var mainMenu = new GUI.Menu.MainMenu(); GUI.Manager.AddControl(mainMenu); NodeTreeView = new Dock.NodeTreeView(); GUI.Manager.AddControl(NodeTreeView); NodeTreeView.Renew(); ViewerController = new Dock.ViewerController(); GUI.Manager.AddControl(ViewerController); Option = new Dock.Option(); GUI.Manager.AddControl(Option); Network = new Network(Native); /* * Command.CommandManager.Changed += OnChanged; * * Core.EffectBehavior.Location.X.OnChanged += OnChanged; * Core.EffectBehavior.Location.Y.OnChanged += OnChanged; * Core.EffectBehavior.Location.Z.OnChanged += OnChanged; * Core.EffectBehavior.Rotation.X.OnChanged += OnChanged; * Core.EffectBehavior.Rotation.Y.OnChanged += OnChanged; * Core.EffectBehavior.Rotation.Z.OnChanged += OnChanged; * Core.EffectBehavior.Scale.X.OnChanged += OnChanged; * Core.EffectBehavior.Scale.Y.OnChanged += OnChanged; * Core.EffectBehavior.Scale.Z.OnChanged += OnChanged; * * Core.EffectBehavior.LocationVelocity.X.OnChanged += OnChanged; * Core.EffectBehavior.LocationVelocity.Y.OnChanged += OnChanged; * Core.EffectBehavior.LocationVelocity.Z.OnChanged += OnChanged; * Core.EffectBehavior.RotationVelocity.X.OnChanged += OnChanged; * Core.EffectBehavior.RotationVelocity.Y.OnChanged += OnChanged; * Core.EffectBehavior.RotationVelocity.Z.OnChanged += OnChanged; * Core.EffectBehavior.ScaleVelocity.X.OnChanged += OnChanged; * Core.EffectBehavior.ScaleVelocity.Y.OnChanged += OnChanged; * Core.EffectBehavior.ScaleVelocity.Z.OnChanged += OnChanged; * Core.EffectBehavior.RemovedTime.Infinite.OnChanged += OnChanged; * Core.EffectBehavior.RemovedTime.Value.OnChanged += OnChanged; * * Core.EffectBehavior.TargetLocation.X.OnChanged += OnChanged; * Core.EffectBehavior.TargetLocation.Y.OnChanged += OnChanged; * Core.EffectBehavior.TargetLocation.Z.OnChanged += OnChanged; * * Core.EffectBehavior.CountX.OnChanged += OnChanged; * Core.EffectBehavior.CountY.OnChanged += OnChanged; * Core.EffectBehavior.CountZ.OnChanged += OnChanged; * * Core.EffectBehavior.Distance.OnChanged += OnChanged; * * Core.EffectBehavior.TimeSpan.OnChanged += OnChanged; * Core.EffectBehavior.ColorAll.R.OnChanged += OnChanged; * Core.EffectBehavior.ColorAll.G.OnChanged += OnChanged; * Core.EffectBehavior.ColorAll.B.OnChanged += OnChanged; * Core.EffectBehavior.ColorAll.A.OnChanged += OnChanged; * * Core.Option.Magnification.OnChanged += OnChanged; * Core.Option.IsGridShown.OnChanged += OnChanged; * Core.Option.GridLength.OnChanged += OnChanged; * Core.Option.BackgroundColor.R.OnChanged += OnChanged; * Core.Option.BackgroundColor.G.OnChanged += OnChanged; * Core.Option.BackgroundColor.B.OnChanged += OnChanged; * Core.Option.BackgroundColor.A.OnChanged += OnChanged; * Core.Option.GridColor.R.OnChanged += OnChanged; * Core.Option.GridColor.G.OnChanged += OnChanged; * Core.Option.GridColor.B.OnChanged += OnChanged; * Core.Option.GridColor.A.OnChanged += OnChanged; * Core.Option.FPS.OnChanged += OnChanged; * * Core.Option.DistortionType.OnChanged += OnChanged; * Core.Option.Coordinate.OnChanged += OnChanged; * * Core.Option.BackgroundImage.OnChanged += OnChanged; * * Core.Culling.IsShown.OnChanged += OnChanged; * Core.Culling.Type.OnChanged += OnChanged; * Core.Culling.Sphere.Location.X.OnChanged += OnChanged; * Core.Culling.Sphere.Location.Y.OnChanged += OnChanged; * Core.Culling.Sphere.Location.Z.OnChanged += OnChanged; * Core.Culling.Sphere.Radius.OnChanged += OnChanged; * * Core.OnAfterLoad += new EventHandler(Core_OnAfterLoad); * Core.OnAfterNew += new EventHandler(Core_OnAfterNew); * Core.OnReload += new EventHandler(Core_OnReload); */ return(true); }