Hi,
I'm playing around with the Windows Look scheme and the close buttons doesn't seem to be working. I'm thinking I have to implement this myself on a callback, but it doesn't seem to be working in the demo either ScrollablePaneDemo either, which leads me to believe that it's perhaps not intentional.
Also, it would be neat with a demo which simply instanciates all the different widgets there is in some manner, both so that one can look at the source and see how they're used ( even if this often is at least fairly straight forward ), but also to see what they are. I'm currently looking for a simple drop down list but don't know what it's named in CEGUI.
Close button doesn't work in demo Sample_ScrollablePaneDemo?
Moderators: CEGUI MVP, CEGUI Team
I'll throw in another quick question
ListBox::addItem() wants ListboxItem, which doesn't inherit from Window. So if I manually create a ListboxTextItem it won't be styled at all, in fact it's not even showing up even if it's added ( this is probably because it doesn't have its properties set ). The interesting thing here though is if one takes a look at WindowsLook.scheme. You then have:
<FalagardMapping WindowType="WindowsLook/Listbox" TargetType="CEGUI/Listbox" Renderer="Falagard/Listbox" LookNFeel="WindowsLook/Listbox" />
Which is the ListBox template from which I create my ListBox. Further down in the same file there's:
<FalagardMapping WindowType="WindowsLook/ListboxItem" TargetType="CEGUI/ItemEntry" Renderer="Falagard/ItemEntry" LookNFeel="WindowsLook/ListboxItem" />
However, it targets ItemEntry and can't be used with ListBox at all ( ItemEntry isn't a ListboxItem ). Am I missing something?
ListBox::addItem() wants ListboxItem, which doesn't inherit from Window. So if I manually create a ListboxTextItem it won't be styled at all, in fact it's not even showing up even if it's added ( this is probably because it doesn't have its properties set ). The interesting thing here though is if one takes a look at WindowsLook.scheme. You then have:
<FalagardMapping WindowType="WindowsLook/Listbox" TargetType="CEGUI/Listbox" Renderer="Falagard/Listbox" LookNFeel="WindowsLook/Listbox" />
Which is the ListBox template from which I create my ListBox. Further down in the same file there's:
<FalagardMapping WindowType="WindowsLook/ListboxItem" TargetType="CEGUI/ItemEntry" Renderer="Falagard/ItemEntry" LookNFeel="WindowsLook/ListboxItem" />
However, it targets ItemEntry and can't be used with ListBox at all ( ItemEntry isn't a ListboxItem ). Am I missing something?
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
Hi,
in order to listen to the close button, you need to subscribe to "FrameWindow::EventCloseClicked". For example the DragDropDemo does listen to this event.
There is a WidgetGalore page on the wiki, which features a demo layout + sources: http://www.cegui.org.uk/wiki/index.php/WidgetGalore
I must confess that i have not verified this code to the latest Cegui build, but i think that it still works.
About the lists: the part behind the "Renderer=" is 'just' how it gets rendered. From a widget point of view, you only need the "WindowType=" part. ListBox items are indeed no true windows, but it has methods for colouring and styling.
It you look at certain samples, for example the FontDemo, you will notice something like:
which specializes a list item, and can be customized. This apprauch is also used in sample7 and a few others. The reason that you don't see the items is most likely because the text colour equals the listbox background color.
HTH!
in order to listen to the close button, you need to subscribe to "FrameWindow::EventCloseClicked". For example the DragDropDemo does listen to this event.
There is a WidgetGalore page on the wiki, which features a demo layout + sources: http://www.cegui.org.uk/wiki/index.php/WidgetGalore
I must confess that i have not verified this code to the latest Cegui build, but i think that it still works.
About the lists: the part behind the "Renderer=" is 'just' how it gets rendered. From a widget point of view, you only need the "WindowType=" part. ListBox items are indeed no true windows, but it has methods for colouring and styling.
It you look at certain samples, for example the FontDemo, you will notice something like:
Code: Select all
class MyListItem : public ListboxTextItem
which specializes a list item, and can be customized. This apprauch is also used in sample7 and a few others. The reason that you don't see the items is most likely because the text colour equals the listbox background color.
HTH!
Check out my released snake game using Cegui!
Cool. thanks!
I have another small question, is there any way to let the widgets auto size? For example, if I create a ComboBox, I'd like it to size itself to its "optimal" size ( in this case, the height would probably be arrowed button to open the drop down ). Same goes for auto sizing to fit content. Seems like the default size of widgets are 0,0?
I have another small question, is there any way to let the widgets auto size? For example, if I create a ComboBox, I'd like it to size itself to its "optimal" size ( in this case, the height would probably be arrowed button to open the drop down ). Same goes for auto sizing to fit content. Seems like the default size of widgets are 0,0?
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
Hi,
no problem I'm affraight that auto-sizing is not available. A widget's default size is indeed 0,0. Like MFC and wxWidgets, you have to provide a size. You just need to play around with values to come up with a nice gui. You could use the layout editor for that.
HTH.
no problem I'm affraight that auto-sizing is not available. A widget's default size is indeed 0,0. Like MFC and wxWidgets, you have to provide a size. You just need to play around with values to come up with a nice gui. You could use the layout editor for that.
HTH.
Check out my released snake game using Cegui!
scriptkid wrote:Hi,
no problem I'm affraight that auto-sizing is not available. A widget's default size is indeed 0,0. Like MFC and wxWidgets, you have to provide a size. You just need to play around with values to come up with a nice gui. You could use the layout editor for that.
HTH.
Ah, thanks for the help
Who is online
Users browsing this forum: No registered users and 14 guests