For info, the tab control is working now, accepting nested content as tabs and flipping between them nicely. The one remaining problem I have is that my tabs at the top don't quite change appearance properly all the time. They start off ok, and overlap each other properly (around the edges like the standard tab control) but when you select other tabs and go back, it seems to get the overlapping edge decision wrong and it starts to look wrong.
I'm getting the feeling this is to do with what CE mentioned earlier, that when moving windows to the front, they are removed and re-added, which is probably screwing up my calculation of whats 'to the left' or 'to the right' of the selected tab. I may have to rethink this.
Anyway, hopefully I can get the last bit nailed tomorrow. This experience has given me even more respect for CE, since not only is the code nice to work with, but he's done a lot more (and more complex) widgets in far less time. This has taken a bit longer than I intended but I've learned a lot
TabControl design
Moderators: CEGUI MVP, CEGUI Team
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
TabControl design
...The one remaining problem I have is that my tabs at the top don't quite change appearance properly all the time...
I'm getting the feeling this is to do with what CE mentioned earlier, that when moving windows to the front, they are removed and re-added, which is probably screwing up my calculation of whats 'to the left' or 'to the right' of the selected tab. I may have to rethink this.
Depending upon how you have gone about this, you could be correct.
The sequence of child windows added to a parent is not stable, and can change for various reasons, but mainly concerning z-order; the order of the windows in the child list determines the z-order of the windows on-screen, and is also used for mouse hit-testing and so on.
So, if you're inspecting the order of the buttons within the child list, then this can definately cause issues. One alternative suggestion is to give each button a sequence number when they are created, and use this to determine the relative sequence of the buttons. Of course, you may already have taken this approach, in which case (obviously) the issue is something else
CE.
- Sinbad
- Not too shy to talk
- Posts: 35
- Joined: Wed Jan 12, 2005 12:06
- Location: Guernsey, Channel Islands
- Contact:
TabControl design
Yep, thats what I figured, and I intend to add a separate indexing system this evening.
- Sinbad
- Not too shy to talk
- Posts: 35
- Joined: Wed Jan 12, 2005 12:06
- Location: Guernsey, Channel Islands
- Contact:
TabControl design
The tab control has been submitted as a patch
http://sourceforge.net/tracker/index.ph ... tid=605424
Here's a shot:
I did my best to follow the conventions of the rest of CEGui; I'm sure CE himself would have put in lots more bells and whistles (show off ) and configurable options, but my main concern was to get this done. Feel free to steroid-enhance it later
http://sourceforge.net/tracker/index.ph ... tid=605424
Here's a shot:
I did my best to follow the conventions of the rest of CEGui; I'm sure CE himself would have put in lots more bells and whistles (show off ) and configurable options, but my main concern was to get this done. Feel free to steroid-enhance it later
- spannerman
- Home away from home
- Posts: 330
- Joined: Wed Jan 12, 2005 12:06
TabControl design
Cool! Looks the part. Thanks for releasing this Sinbad
squawk!! *Vulture swoops in to nick free lunch*
squawk!! *Vulture swoops in to nick free lunch*
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
TabControl design
Looks very good indeed Thanks for submitting the patch.
I'll endeavour to get this into CVS over the weekend. This is one thing I can take off the list of things to do for the second batch of widgets
I'll endeavour to get this into CVS over the weekend. This is one thing I can take off the list of things to do for the second batch of widgets
Return to “CEGUI Library Development Discussion”
Who is online
Users browsing this forum: No registered users and 2 guests