Some of you may remember Hierarchical widgets, my first attempt to improve the widgets. It was not accepted since the patch was too big to understand.
I found another way to start working on this problem, and have another go at it.
Attached you will find a document describing the changes. Also, to give you an idea of how it will change, I attached the patch for the intro screen.
The whole patch is at http://bugs.openttd.org/task/1905 (comment date: Saturday, 07 March 2009, 18:51 GMT).
Besides the actual code changes, there are patches for 3 more windows (news type 0, news history, and vehicle list windows)
Feedback is welcome!
Hierarchical widgets, take 2
Moderator: OpenTTD Developers
Hierarchical widgets, take 2
- Attachments
-
- nwidgets.pdf
- nested widgets documentation file
- (126.22 KiB) Downloaded 394 times
-
- 06_intro_window_parts.patch
- patch for the intro screen window
- (6.53 KiB) Downloaded 127 times
Re: Hierarchical widgets, take 2
Lol, that looks like the system I used for my own project, but I'm too bad at coding so I think I'm not able to fully implement it.
I implemented this only on the menu and the scrollbar, I'm trying to gather my forces to try to extend this method to all the forms (especially to the title bar) and I can assure that is more flexible and automatised than the current OTTD implementation
The main problem I have is to build them dynamically runtime with events
I implemented this only on the menu and the scrollbar, I'm trying to gather my forces to try to extend this method to all the forms (especially to the title bar) and I can assure that is more flexible and automatised than the current OTTD implementation
The main problem I have is to build them dynamically runtime with events

Re: Hierarchical widgets, take 2
A small update:
I have added nested widget tree replacements for the vehicle group window and the network server window to the FlySpray entry.
The latter needed some additional hacking as it does heavy custom resize trickery.
Also updated the default settings for the nested widgets a bit.
Last but not least, I have made a Dump() method that outputs a compact overview of a window. Great for debugging.
Not sure whether this belongs in trunk, so I'll post it here.
I have added nested widget tree replacements for the vehicle group window and the network server window to the FlySpray entry.
The latter needed some additional hacking as it does heavy custom resize trickery.
Also updated the default settings for the nested widgets a bit.
Last but not least, I have made a Dump() method that outputs a compact overview of a window. Great for debugging.
Not sure whether this belongs in trunk, so I'll post it here.
- Attachments
-
- 10y_debug_nwidgets.patch
- Additional 'Dump' method for outputting the nested widget tree.
- (4.39 KiB) Downloaded 130 times
Who is online
Users browsing this forum: Clanority and 7 guests