Program.cs 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. using System;
  2. using System.Collections.Generic;
  3. using BansheeEngine;
  4. namespace BansheeEditor
  5. {
  6. class ProgramEd
  7. {
  8. private static InspectorWindow window;
  9. private static Debug_Component1 dbgComponent;
  10. static void Main()
  11. {
  12. window = EditorWindow.OpenWindow<InspectorWindow>();
  13. SceneObject newDbgObject = new SceneObject("NewDbgObject");
  14. dbgComponent = newDbgObject.AddComponent<Debug_Component1>();
  15. newDbgObject.AddComponent<Debug_Component2>();
  16. window.SetObjectToInspect(newDbgObject);
  17. SceneObject gizmoDbgObject = new SceneObject("GizmoDebug");
  18. gizmoDbgObject.AddComponent<DbgGizmoComponent>();
  19. DbgResource testResource = new DbgResource();
  20. //ProjectLibrary.Create(testResource, @"testResource");
  21. // Starts main editor window with the specified width/height and render system
  22. // (Window position and sizes are stored internally. Restored upon StartUp and saved upon ShutDown)
  23. //EditorApplication.StartUp(RenderSystem.DX11, 1024, 800);
  24. // TODO - A class to manipulate menu items
  25. //ProjectSelectWindow window = new ProjectSelectWindow();
  26. //GUIElementStateStyle dbgStyle = new GUIElementStateStyle();
  27. //Color newColor = Color.red;
  28. //dbgStyle.textColor = newColor;
  29. }
  30. static void EditorUpdate()
  31. {
  32. window.Refresh();
  33. if (dbgComponent != null)
  34. dbgComponent.intArray[0] = dbgComponent.intArray[0] + 1;
  35. }
  36. }
  37. //class SceneView : EditorWindow
  38. //{
  39. // SceneView()
  40. // {
  41. // GUI is a GUILayout that is initialized internally by EditorWindow
  42. //GUI.AddButton("Some text");
  43. //GUI.AddXLayout();
  44. //GUI.CreateAreaFixed(100, 100, 400, 400); // GUIArea creating another GUIArea
  45. // Add support for GUIContent
  46. // Add support for GUILayoutOptions
  47. // Add support for GUIElementStyle and GUISkin - For now ignore this as I need to deal with Fonts, Textures, SpriteTextures, etc.
  48. // }
  49. //}
  50. //class MyGUI : //GUIWidget // GUIWidget is automatically initialized with Game render window. Editor GUIWidgets are specially initialized
  51. //{
  52. //}
  53. }