menusystem and listbox changes
Moderators: CEGUI MVP, CEGUI Team
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
menusystem and listbox changes
Hi all my fellow CEGUI coders.
As I have said in a few other posts, I'm working on a menu system for CEGUI.
I have used the Roadmap to guide me, and thus I done the following:
- Made the ItemEntry class and a few subclasses: TextItem, MenubarItem currently. The only difference between a DefaultWindow and a TextItem is that the latter has a textColour and prints a text label.
MenubarItem has pushed,hover etc. states...
- Made a ItemListBase class that has the basic features for manipulating a list of item widgets.
wnd->addItem() should be used to add ItemEntry child windows.
- Derived a Menubar and PopupMenu from the ItemListBase to handle the actual menu windows.
Currently I have left the Listbox as it is, and I will only start on it when the menusystem is done. I have taken measures to make it fairly easy to convert to the ItemListBase/ItemEntry implementation. And most function names/behavior has not changed for compatibility.
I'm starting with WindowsLook, and will do taharez when it's all done.
Right now only the Menubar works, but It's almost done.
Items work too. I have just started the PopupMenu.
So... I just wanted to hear if anyone have had any thoughts about the menusystem. Things are going faster now as most of the boring code is over, so I'd really like some feedback.
heres a little screenshot of the menubar:
Setting it up is very easy. You just set the size of the menubar, and the text on the items. Add the items and everything gets laid out automatically.
I have'nt worked that much on the imagery yet though...
As I have said in a few other posts, I'm working on a menu system for CEGUI.
I have used the Roadmap to guide me, and thus I done the following:
- Made the ItemEntry class and a few subclasses: TextItem, MenubarItem currently. The only difference between a DefaultWindow and a TextItem is that the latter has a textColour and prints a text label.
MenubarItem has pushed,hover etc. states...
- Made a ItemListBase class that has the basic features for manipulating a list of item widgets.
wnd->addItem() should be used to add ItemEntry child windows.
- Derived a Menubar and PopupMenu from the ItemListBase to handle the actual menu windows.
Currently I have left the Listbox as it is, and I will only start on it when the menusystem is done. I have taken measures to make it fairly easy to convert to the ItemListBase/ItemEntry implementation. And most function names/behavior has not changed for compatibility.
I'm starting with WindowsLook, and will do taharez when it's all done.
Right now only the Menubar works, but It's almost done.
Items work too. I have just started the PopupMenu.
So... I just wanted to hear if anyone have had any thoughts about the menusystem. Things are going faster now as most of the boring code is over, so I'd really like some feedback.
heres a little screenshot of the menubar:
Setting it up is very easy. You just set the size of the menubar, and the text on the items. Add the items and everything gets laid out automatically.
I have'nt worked that much on the imagery yet though...
Re: menusystem and listbox changes
Sounds great. Will it be in cvs soon?
Also, do you plan to modify the layout handler to let users feed menus with items directly from xml?
Congratulations for your work.
--
Chris
Also, do you plan to modify the layout handler to let users feed menus with items directly from xml?
Congratulations for your work.
--
Chris
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
Re: menusystem and listbox changes
I do not have write access to anything but the scriptmodule.
But I will submit a patch (a fairly large patch) soon.
There is still quite a few things that has to be done.
properties are not written yet.. documentation is lagging etc. so don't expect it tomorrow.
With regards to the layouts, that was the plan...
and thanx
But I will submit a patch (a fairly large patch) soon.
There is still quite a few things that has to be done.
properties are not written yet.. documentation is lagging etc. so don't expect it tomorrow.
With regards to the layouts, that was the plan...
and thanx
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
Re: menusystem and listbox changes
Ok... the menusystem is coming along nicely now.
here a little screener for the impatient:
I'm having a little trouble with the automatic resize feature though.
It just wont work i relative mode.
My current workaround is to default the metricsmode to Absolute for the menubar and popupmenu.
Anyone who has the magic key to get relative working ?
I have'nt really worked that much with the coordinate system of CEGUI, or looked at the code yet...
Anyway...
I'd like some ideas for graphics. First windows look.
as said earlier Taharez will come when its done.
here a little screener for the impatient:
I'm having a little trouble with the automatic resize feature though.
It just wont work i relative mode.
My current workaround is to default the metricsmode to Absolute for the menubar and popupmenu.
Anyone who has the magic key to get relative working ?
I have'nt really worked that much with the coordinate system of CEGUI, or looked at the code yet...
Anyway...
I'd like some ideas for graphics. First windows look.
as said earlier Taharez will come when its done.
Re: menusystem and listbox changes
Just wanna say that i find your current graphics pretty good. You're really doing great work!
And for the second point, i'm not sure but this may help you :
http://www.cegui.org.uk/api_reference/c ... Windowa137
--
Chris
And for the second point, i'm not sure but this may help you :
http://www.cegui.org.uk/api_reference/c ... Windowa137
--
Chris
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
Re: menusystem and listbox changes
a little update:
the menu system is now practically done. only minor cleanups etc. remain left.
sub-popups are'nt done yet but all the backing code is there, so it's a minor modification.
To be able to emultate win32 menu's, I had to be able to know if the parent window of a menuitem was either a menubar or a popupmenu.
I needed this to implement the automatic closing/opening (browsing) of popups.
So I have made a new virtual member of CEGUI::Window:
to all classes with an EventNamespace.
there are a few issues with this though. fx. I somebody chooses to subclass the menubar and add their own events, the event namespace would change and the menuitems would no longer act as if they were in a menu!
Have I missed some existing functionality for getting the "real" type of a window object?
anyway....
Currently popupmenu's only allow one sub-popup open, while menubar has two modes.
1) only allow one popupmenu open at a time.
you click a menuitem to open the popup. click again to close, or while its open move the mouse-cursor over one of the other items in the same menubar. this will then close the currently open popup and open the one for the menuitem under the cursor instead.
2) allowMultiplePopups.
you click a menuitem to toggle its popupmenu.
multiple popups can be opened at once.
all popups in a chain of popups are closed when an item is clicked.
I'll probably post a patch here in this thread tonight or tomorrow, but I won't post it to the tracker before TaharezLook is done too.
What do you think of the new colours?
the menu system is now practically done. only minor cleanups etc. remain left.
sub-popups are'nt done yet but all the backing code is there, so it's a minor modification.
To be able to emultate win32 menu's, I had to be able to know if the parent window of a menuitem was either a menubar or a popupmenu.
I needed this to implement the automatic closing/opening (browsing) of popups.
So I have made a new virtual member of CEGUI::Window:
Code: Select all
virtual const String& getEventNamespace(void) const {return EventNamespace;}
to all classes with an EventNamespace.
there are a few issues with this though. fx. I somebody chooses to subclass the menubar and add their own events, the event namespace would change and the menuitems would no longer act as if they were in a menu!
Have I missed some existing functionality for getting the "real" type of a window object?
anyway....
Currently popupmenu's only allow one sub-popup open, while menubar has two modes.
1) only allow one popupmenu open at a time.
you click a menuitem to open the popup. click again to close, or while its open move the mouse-cursor over one of the other items in the same menubar. this will then close the currently open popup and open the one for the menuitem under the cursor instead.
2) allowMultiplePopups.
you click a menuitem to toggle its popupmenu.
multiple popups can be opened at once.
all popups in a chain of popups are closed when an item is clicked.
I'll probably post a patch here in this thread tonight or tomorrow, but I won't post it to the tracker before TaharezLook is done too.
What do you think of the new colours?
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
Re: menusystem and listbox changes
the patch is a little delayed...
I've been working on a few features, and I really did'nt like the getEventNamespace approach.
But thats fixed now!
I've played around with a little alpha fade in/out feature. Should I include it in the patch or is it something people should customize themselves?
I've been working on a few features, and I really did'nt like the getEventNamespace approach.
But thats fixed now!
I've played around with a little alpha fade in/out feature. Should I include it in the patch or is it something people should customize themselves?
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
Re: menusystem and listbox changes
The first step is done, and I have uploaded the patch.
You can find at the tracker.
Still just WindowsLook, but everything I could think of is complete.
Layouts work. adding an ItemEntry as a child adds it as an item.
add a popupmenu as a child to a menuitem attaches the popup to it.
properties are done.
well... check for patch for more
Forget the first few posts. They do not reflect the current system!
You can find at the tracker.
Still just WindowsLook, but everything I could think of is complete.
Layouts work. adding an ItemEntry as a child adds it as an item.
add a popupmenu as a child to a menuitem attaches the popup to it.
properties are done.
well... check for patch for more
Forget the first few posts. They do not reflect the current system!
Re: menusystem and listbox changes
Cool. I'll review the patch and commit it.
Re: menusystem and listbox changes
This looks pretty good. I'll commit it this weekend after a little more testing.
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
Re: menusystem and listbox changes
hi.
good to hear the patch is useful... took a while to code it.
anyway, just to let you know, I'll resume work on TaharezLook and further Listbox changes once it is in CVS.
I've just had a nice little week off C++... (insted PHP took my time) so now I'm fresh for another round
good to hear the patch is useful... took a while to code it.
anyway, just to let you know, I'll resume work on TaharezLook and further Listbox changes once it is in CVS.
I've just had a nice little week off C++... (insted PHP took my time) so now I'm fresh for another round
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
Re: menusystem and listbox changes
I just realized that I have been given write access to cegui CVS module (not just the scripting module)
So expect to see this in CVS soon
UPDATE: This has now been committed. So in about 24 hours it should become available in anonymous CVS.
I'll resume work now, and I would love some feedback.
So expect to see this in CVS soon
UPDATE: This has now been committed. So in about 24 hours it should become available in anonymous CVS.
I'll resume work now, and I would love some feedback.
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
Re: menusystem and listbox changes
There are no breaking changes in the code.
The WindowsLook titlebar imagery has been updated to avoid some scaling issues though, so you will need to update your imageset
The WindowsLook titlebar imagery has been updated to avoid some scaling issues though, so you will need to update your imageset
- spannerman
- Home away from home
- Posts: 330
- Joined: Wed Jan 12, 2005 12:06
Re: menusystem and listbox changes
Just wanted to say that this is looking great, youve done a very good job. Hopefully I'll get chance to test this soon - a menu is very useful widget to have!
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
Re: menusystem and listbox changes
thanx spannerman
I just realized I forgot the makefiles though.
I have updated the MSVC7.1 project files, as that is the only 'platform' I have access to.
I'll take a look at the other 'makefiles' today (probably edit them by hand), but I can't test them though...
for anyone interested, the new files (both .h and .cpp variants) are:
I just realized I forgot the makefiles though.
I have updated the MSVC7.1 project files, as that is the only 'platform' I have access to.
I'll take a look at the other 'makefiles' today (probably edit them by hand), but I can't test them though...
for anyone interested, the new files (both .h and .cpp variants) are:
Code: Select all
elements/CEGUIItemEntry.x
elements/CEGUIItemListBase.x
elements/CEGUIItemListBaseProperties.x
elements/CEGUIMenubar.x
elements/CEGUIMenuBase.x
elements/CEGUIMenuBaseProperties.x
elements/CEGUIMenuItem.x
elements/CEGUIMenuItemProperties.x
elements/CEGUIPopupMenu.x
elements/CEGUIPopupMenuProperties.x
elements/CEGUITextItem.x
elements/CEGUITextItemProperties.x
WindowsLook:
WLMenubar.x
WLMenuItem.x
WLPopupMenu.x
WLTextItem.x
Return to “CEGUI Library Development Discussion”
Who is online
Users browsing this forum: No registered users and 5 guests