TODO_2D_GUI.txt 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. Custom C# GUI:
  2. Advantages
  3. Qt makes it impossible to create a proper docking system but I can't find top-most window
  4. In general such simple operations are proving problematic
  5. I will need to build a system working with C# anyway at one point
  6. Qt is possibly slow (example is the Console and List widget)
  7. C# is much easier to write
  8. Disadvantages
  9. I need to implement Camelot2D and CamelotGUI system
  10. - These systems need to be designed properly and I will likely need to re-design some of engine systems if I find them lacking and they haven't been properly tested
  11. Multiplatform management of windows might be problematic (However it might get handled by Mono decently?)
  12. I will need to create a C# interface for the system (Need to do this anyway)
  13. I need many controls I wouldn't need for a game
  14. Camelot2D
  15. - Check out Ogre and possibly Torque to see how they implement it
  16. - Support for sprites
  17. - Support for text
  18. - Optimized rendering?
  19. - Allow to place sprites into pages, which then get texture atlased
  20. - Before rendering dynamically batch the mesh so number of 2D draw calls is reduced
  21. - Animated sprites?
  22. CamelotGUI
  23. - Label
  24. - Text field
  25. - Int field, float field?
  26. - Text area
  27. - Scroll area (Vert/Horz)
  28. - Button
  29. - Checkbox
  30. - Radio button
  31. - Tree view
  32. - List view
  33. - Allow Unity-like layout based system, only with callbacks
  34. - All controls must be fully skinnable
  35. --------------------------------
  36. CamelotGUI
  37. - Traditional UI with buttons, lists, text fields, etc.
  38. - Easy to use for desiging the editor and debugging
  39. - See the UML diagram (GUIClassDiagram.violet) for description
  40. Camelot2D
  41. - System meant for 2D games and proper in-game UIs
  42. - Proper support for all kinds of animation
  43. - Together with helpful controls for rendering text, input boxes, etc.
  44. Maybe it would be better to somewhat combine these two after all, to avoid re-doing a lot of code?
  45. - All UI elements can reference a GUITexture instead of a texture. GUITextures can be pre-processed into a texture atlas before use
  46. so that UI can be easily dynamically batched.
  47. - This way both GUI types can use GameObjects for rendering and share the same types
  48. - Rendering is handled by some parent GUI class, not individual elements. So that the GUI can be properly batched
  49. - Need layers that will allow me to filter GameObjects for rendering camera per camera
  50. - Need a flag that will hide Editor elements in Hierarchy, and also prevent saving them with scene.
  51. - CamelotCore should in no way depend on CamelotGUI or Camelot2D (if I decide to split them into two classes)
  52. Start just with Camelot2D
  53. - Text rendering
  54. - Sprite rendering (+ batching and similar)
  55. Then CamelotGUI providing basic controls like Labels, Buttons, TextFields
  56. Then CamelotEditor providing its own implementation of CamelotGUI
  57. FIRST STEP:
  58. - Camelot2D, Freetype and fonts. See Ogre::Font
  59. Support both ttf and image fonts? Image fonts would get loaded from an texture + .xml file and could be used made
  60. - Fonts should always be defined through an image + FontDesc
  61. - Freetype importer would just generate the image and FontDesc automatically?