Clean Up OO of Overlays, Elements, Panels
Posted: Wed Dec 19, 2007 3:59 am
From my experience with building my own GUI, I think a lot of developer time could be saved with a few small tweaks to the panel/overlay/element system in the OGRE engine (as they are quite handy actually).
1. Inheritance and Polymorphism could be better as, at the moment a lot of very messy casts are required to create new objects, and I also find myself having to keep hold of pointers to each of the different casts from the same object to perform different functions, which is a bit messy also.
2. The ability to copy Overlays loaded from the .overlay files. To build my different widgets I had to write a whole lot of code. It would have been much quicker if I could just duplicate and modify a generic widget defined in a .overlay file. At the moment this is very hard to do, mainly due to unique name clashes.
With both of these improvements, you could knock together a custom GUI in about 2 hours, with hardly any code, and all visual adjustments made without the need to recompile. (Therefore almost eliminating the need to use a GUI library altogether).
Hope that helps!
1. Inheritance and Polymorphism could be better as, at the moment a lot of very messy casts are required to create new objects, and I also find myself having to keep hold of pointers to each of the different casts from the same object to perform different functions, which is a bit messy also.
2. The ability to copy Overlays loaded from the .overlay files. To build my different widgets I had to write a whole lot of code. It would have been much quicker if I could just duplicate and modify a generic widget defined in a .overlay file. At the moment this is very hard to do, mainly due to unique name clashes.
With both of these improvements, you could knock together a custom GUI in about 2 hours, with hardly any code, and all visual adjustments made without the need to recompile. (Therefore almost eliminating the need to use a GUI library altogether).
Hope that helps!
