Inspector.txt 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. Needed controls:
  2. Array field/List field/Dictionary field
  3. Matrix3 field
  4. Matrix4 field
  5. GameObject field
  6. Resource field
  7. -------------
  8. Cursor
  9. - A way to save/load a set of cursors
  10. IMMEDIATE:
  11. - Deleting first entry in input field moves the cursor incorrectly
  12. - Test if parsing int/float value from int/float field actually works
  13. - ProfilerOverlay elements are constantly dirty? even though I'm not calling update
  14. Other:
  15. - Refactor BuiltinMaterialFactory to BuiltinEngineResources
  16. -------------
  17. REFACTOR c++ GUI a bit:
  18. - Add new graphic for input boxes and add object field graphics
  19. - Add "padding" to GUIElementStyle and make sure GUILayout (and whatever else) uses it
  20. - Edit all Editor *Field classes and make sure they use GUILayout internally (where possible, probably not for Foldout which has a background element that would require 2 layers)
  21. How will I add editor fields to GUILayout? Right now I have a bunch of Add* methods and that won't work for Editor-only fields. I could extend GUILayout to EditorGUILayout but then GUIArea needs to be aware of that as well...
  22. GUIElement has GetChild/GetNumChildren, which isn't really useful for elements like GUIToggle, GUIButton, etc.
  23. - GUIElements and GUILayout should still share same base class, but make it GUIElementBase, that doesn't include children
  24. Refactor GUILayout so it has AddElement, RemoveElement, InsertElement, GetChildren, GetNumChildren methods
  25. - GUIElement reference should be kept by parent layout, so if it is ever removed (or never added) it will get garbage collected and destroyed
  26. Layouts/Areas/Elements need SetVisible(true/false) toggle
  27. -------------
  28. Implementation order:
  29. - Component foldout
  30. - Color picker modular window
  31. - Possibly a generic ModularWindow class
  32. - EditorUtility::showColorPicker
  33. - GameObject/resource field
  34. - Matrix fields
  35. - Refactor C# GUI
  36. - Basic InspectableObject and basic Inspector that open Inspector window, display SceneManager base fields and a list of components
  37. - Per-component generic and custom inspectors
  38. -------------
  39. IMPORTANT:
  40. - I should probably consider making each Component part of the inspector its own separate GUIWidget, otherwise I wont
  41. be able to use multiple GUIAreas in the Inspectors, which is fairly limiting.
  42. - Each has a separate EditorGUI instance?
  43. TOMORROW:
  44. - InspectableObject calls a C++ method which gets all SerializableFields, and C++ in turn
  45. generates a list of InspectableFields
  46. - They should have a type, name, and get/set methods
  47. Dont forget to implement SceneObject.GetComponents
  48. Tab indexes
  49. - EditorFields should have SetNextField method that allow you to set tab order directly
  50. - InspectableField are automatically assigned ID
  51. - ID is part depth (also governs identation) and part sequential index
  52. - This allows me to add/remove elements from objects like lists and arrays and not mess up the tab order
  53. - Also collapse/expand doesn't require us to modify tab indexes
  54. - InspectableObjects should likely have a reference to the Inspector so that they can query next InspectableField based on tab ID
  55. - These IDs are then used for calling SetNextField on normal EditorFields
  56. Custom inspector
  57. - Custom inspector should have complete knowledge of the GUI objects within it (so that parent Inspector can expand/collapse it without worrying about the user forgetting to hide an element and messing up the other inspectors)
  58. - Since custom inspector should have all of its elements in a specific GUILayout, we should be able to just manipulate that GUILayout
  59. Positioning/Indentation
  60. - Inspector needs to be provided with a layout
  61. - Whenever an InspectableObject is created it will create a new X layout with a space (for indenting) and a Y layout (for child elements)
  62. - We will provide it with parent layout from which to create those on
  63. - And depth for determining indent amount
  64. - For top level objects there is no space or X layout (depth is 0)
  65. - InspectableFields will use the Layouts they are given by their parent InspectableObjects
  66. C++ bit for creating InspectableField
  67. - Need a way to list all fields in an object (should already have most of that functionality)
  68. - And hook up those fields with get/set callbacks for editing/updating
  69. UndoRedo
  70. - A global UndoRedo class for generic use
  71. - Specific UndoRedo for automatic use in InspectableField
  72. - Will likely need Undo/Redo context
  73. - e.g. when in a text field I want to undo/redo my changes in that text field one by one
  74. - but when I click outside maybe I just want to undo to the previous state before I even focused on that text field
  75. - plus it doesn't make sense for example to undo a text field if I'm currently focusing on something in scene
  76. IMPLEMENTATION
  77. - Add a Foldout GUI type and its C# version
  78. - Attempt to display a list of Components on a SceneObject just by using the foldouts
  79. - Add basic IntField and hook it up with InspectableField (get/set methods and everything)
  80. - Add Multi-rank array, List & Dictionary types