Program.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. DbgResource testResource = new DbgResource();
  18. //ProjectLibrary.Create(testResource, @"D:\DummyBansheeProject\Resources\testResource");
  19. // Starts main editor window with the specified width/height and render system
  20. // (Window position and sizes are stored internally. Restored upon StartUp and saved upon ShutDown)
  21. //EditorApplication.StartUp(RenderSystem.DX11, 1024, 800);
  22. // TODO - A class to manipulate menu items
  23. //ProjectSelectWindow window = new ProjectSelectWindow();
  24. //GUIElementStateStyle dbgStyle = new GUIElementStateStyle();
  25. //Color newColor = Color.red;
  26. //dbgStyle.textColor = newColor;
  27. }
  28. static void EditorUpdate()
  29. {
  30. window.Refresh();
  31. if (dbgComponent != null)
  32. dbgComponent.intArray[0] = dbgComponent.intArray[0] + 1;
  33. }
  34. }
  35. //class SceneView : EditorWindow
  36. //{
  37. // SceneView()
  38. // {
  39. // GUI is a GUILayout that is initialized internally by EditorWindow
  40. //GUI.AddButton("Some text");
  41. //GUI.AddXLayout();
  42. //GUI.CreateAreaFixed(100, 100, 400, 400); // GUIArea creating another GUIArea
  43. // Add support for GUIContent
  44. // Add support for GUILayoutOptions
  45. // Add support for GUIElementStyle and GUISkin - For now ignore this as I need to deal with Fonts, Textures, SpriteTextures, etc.
  46. // }
  47. //}
  48. //class MyGUI : //GUIWidget // GUIWidget is automatically initialized with Game render window. Editor GUIWidgets are specially initialized
  49. //{
  50. //}
  51. }