Program.cs 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. using System;
  2. using System.Collections.Generic;
  3. using BansheeEngine;
  4. namespace BansheeEditor
  5. {
  6. class Program
  7. {
  8. private static EditorApplication app;
  9. static void OnInitialize()
  10. {
  11. app = new EditorApplication();
  12. DbgResource testResource = ManagedResource.Create<DbgResource>();
  13. //ProjectLibrary.Create(testResource, @"testResource");
  14. // Starts main editor window with the specified width/height and render system
  15. // (Window position and sizes are stored internally. Restored upon StartUp and saved upon ShutDown)
  16. //EditorApplication.StartUp(RenderSystem.DX11, 1024, 800);
  17. // TODO - A class to manipulate menu items
  18. //ProjectSelectWindow window = new ProjectSelectWindow();
  19. //GUIElementStateStyle dbgStyle = new GUIElementStateStyle();
  20. //Color newColor = Color.red;
  21. //dbgStyle.textColor = newColor;
  22. }
  23. static void OnEditorLoad()
  24. {
  25. if (EditorSettings.AutoLoadLastProject)
  26. {
  27. string projectPath = EditorSettings.LastOpenProject;
  28. if (EditorApplication.IsValidProject(projectPath))
  29. EditorApplication.LoadProject(projectPath);
  30. else
  31. ProjectWindow.Open();
  32. }
  33. else
  34. ProjectWindow.Open();
  35. }
  36. static void OnEditorUpdate()
  37. {
  38. app.OnEditorUpdate();
  39. }
  40. }
  41. //class SceneView : EditorWindow
  42. //{
  43. // SceneView()
  44. // {
  45. // GUI is a GUILayout that is initialized internally by EditorWindow
  46. //GUI.AddButton("Some text");
  47. //GUI.AddXLayout();
  48. //GUI.CreateAreaFixed(100, 100, 400, 400); // GUIArea creating another GUIArea
  49. // Add support for GUIContent
  50. // Add support for GUILayoutOptions
  51. // Add support for GUIElementStyle and GUISkin - For now ignore this as I need to deal with Fonts, Textures, SpriteTextures, etc.
  52. // }
  53. //}
  54. //class MyGUI : //GUIWidget // GUIWidget is automatically initialized with Game render window. Editor GUIWidgets are specially initialized
  55. //{
  56. //}
  57. }