Property Finder
Moderators: CEGUI MVP, CEGUI Team
Property Finder
I've Wikied a utility to display the properties associated with the widgets of a particular scheme: Property Finder. Let me know how it works...
The list of properties for the TaharezLook and the WindowsLook widgets have been wikied.
Jump to the post on How to integrate non-Cegui widgets
The list of properties for the TaharezLook and the WindowsLook widgets have been wikied.
Jump to the post on How to integrate non-Cegui widgets
Last edited by Rackle on Fri Jun 29, 2007 17:37, edited 4 times in total.
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
Very nice one
Seems to work good, i only had to change the default resource paths from '../samples/datafiles' to '../datafiles'. No big deal of course but i wonder what you changed to your directory structure.
We good quit easily show a difference (colour wise) between default- and falagard properties by checking if the 'getHelp()' contains "falagard". But maybe not start hacking at day 2 already
Seems to work good, i only had to change the default resource paths from '../samples/datafiles' to '../datafiles'. No big deal of course but i wonder what you changed to your directory structure.
We good quit easily show a difference (colour wise) between default- and falagard properties by checking if the 'getHelp()' contains "falagard". But maybe not start hacking at day 2 already
Added an export button and coded the Wiki format. The result of that export is Wikied.
Figured out how to put colors in the Properties section of the Wiki:
Code: Select all
<font COLOR=\"#FFBF00\">Falagard</font>
oh, by the way, I added links to both of your wiki entries into the FAQ, Section 3.6
How to integrate non-Cegui widgets
This is based on Levia's How to create a CheckListboxItem.
I've modified Taharezlook.looknfeel such that
becomes
Then I inserted the following into PropertyFinder.h, just before the class DemoSample : public CEGuiSample:
Then within the initialiseSample() function I inserted
Then I recompiled and ran PropertyFinder and lo and behold Levia's CheckListboxItem appears! Wicked.
This is based on Levia's How to create a CheckListboxItem.
I've modified Taharezlook.looknfeel such that
Code: Select all
<?xml version="1.0" ?>
<Falagard>
<!--
***************************************************
TaharezLook/Button
***************************************************
-->
<WidgetLook name="TaharezLook/Button">
becomes
Code: Select all
<?xml version="1.0" ?>
<Falagard>
<WidgetLook name="TaharezLook/CheckListboxItem">
<PropertyDefinition name="TextColour" initialValue="FFFF0000" redrawOnWrite="true" />
<PropertyDefinition name="SelectedTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
<PropertyDefinition name="SelectionBrush" initialValue="set:TaharezLook image:Background" redrawOnWrite="true" />
<PropertyDefinition name="SelectionColour" initialValue="FF3030FF" redrawOnWrite="true" />
<Property name="Selectable" value="True" />
<NamedArea name="ContentSize">
<Area>
<Dim type="LeftEdge" >
<AbsoluteDim value="0" />
</Dim>
<Dim type="TopEdge" >
<AbsoluteDim value="0" />
</Dim>
<Dim type="Width" >
<FontDim type="HorzExtent" padding="6" />
</Dim>
<Dim type="Height" >
<FontDim type="LineSpacing" />
</Dim>
</Area>
</NamedArea>
<Child type ="TaharezLook/Checkbox" nameSuffix="__auto__checkbox">
<Area>
<Dim type="LeftEdge">
<UnifiedDim scale="0" type="LeftEdge" />
<AbsoluteDim value="3" />
</Dim>
<Dim type="TopEdge">
<UnifiedDim scale="0" type="TopEdge" />
</Dim>
<Dim type="Width">
<UnifiedDim scale="0.45" type="Width" />
</Dim>
<Dim type="Height">
<UnifiedDim scale="1" type="Height"/>
</Dim>
</Area>
</Child>
<Child type ="TaharezLook/Button" nameSuffix="__auto__button1">
<Area>
<Dim type="LeftEdge">
<UnifiedDim scale="0.5" type="LeftEdge" />
</Dim>
<Dim type="TopEdge">
<UnifiedDim scale="0" type="TopEdge" />
</Dim>
<Dim type="Width">
<UnifiedDim scale="0.45" type="Width" />
</Dim>
<Dim type="Height">
<UnifiedDim scale="0.45" type="Height"/>
</Dim>
</Area>
</Child>
<Child type ="TaharezLook/Button" nameSuffix="__auto__button2">
<Area>
<Dim type="LeftEdge">
<UnifiedDim scale="0.5" type="LeftEdge" />
</Dim>
<Dim type="TopEdge">
<UnifiedDim scale="0.50" type="TopEdge" />
</Dim>
<Dim type="Width">
<UnifiedDim scale="0.45" type="Width" />
</Dim>
<Dim type="Height">
<UnifiedDim scale="0.45" type="Height"/>
</Dim>
</Area>
</Child>
<ImagerySection name="label">
<TextComponent>
<Area>
<Dim type="TopEdge">
<AbsoluteDim value="0" />
</Dim>
<Dim type="LeftEdge">
<AbsoluteDim value="18" />
</Dim>
<Dim type="RightEdge">
<UnifiedDim scale="1" offset="-3" type="RightEdge" />
</Dim>
<Dim type="BottomEdge">
<UnifiedDim scale="1" type="BottomEdge" />
</Dim>
</Area>
</TextComponent>
</ImagerySection>
<ImagerySection name="selection">
<ImageryComponent>
<Area>
<Dim type="TopEdge">
<AbsoluteDim value="0" />
</Dim>
<Dim type="LeftEdge">
<AbsoluteDim value="0" />
</Dim>
<Dim type="RightEdge">
<UnifiedDim scale="1" type="RightEdge" />
</Dim>
<Dim type="BottomEdge">
<UnifiedDim scale="1" type="BottomEdge" />
</Dim>
</Area>
<ImageProperty name="SelectionBrush" />
<ColourProperty name="SelectionColour" />
<VertFormat type="Stretched" />
<HorzFormat type="Stretched" />
</ImageryComponent>
</ImagerySection>
<StateImagery name="Enabled">
<Layer>
<Section section="label">
<ColourProperty name="TextColour" />
</Section>
</Layer>
</StateImagery>
<StateImagery name="Disabled">
<Layer>
<Section section="label">
<ColourProperty name="TextColour" />
</Section>
</Layer>
</StateImagery>
<StateImagery name="SelectedEnabled">
<Layer>
<Section section="selection" />
<Section section="label">
<ColourProperty name="SelectedTextColour" />
</Section>
</Layer>
</StateImagery>
<StateImagery name="SelectedDisabled">
<Layer>
<Section section="selection" />
<Section section="label">
<ColourProperty name="SelectedTextColour" />
</Section>
</Layer>
</StateImagery>
</WidgetLook>
<!--
***************************************************
TaharezLook/Button
***************************************************
-->
<WidgetLook name="TaharezLook/Button">
Then I inserted the following into PropertyFinder.h, just before the class DemoSample : public CEGuiSample:
Code: Select all
namespace CEGUI
{
class CheckListboxItem : public ItemEntry
{
public:
CheckListboxItem(const String &type, const String &name);
virtual ~CheckListboxItem();
static const String WidgetTypeName;
static void Register();
};
CEGUI_DECLARE_WINDOW_FACTORY(CheckListboxItem)
}
namespace CEGUI
{
CEGUI_DEFINE_WINDOW_FACTORY(CheckListboxItem)
const String CheckListboxItem::WidgetTypeName("CEGUI/CheckListboxItem");
CheckListboxItem::CheckListboxItem(const String &type, const String &name) :
ItemEntry(type, name)
{
}
CheckListboxItem::~CheckListboxItem()
{
}
void CheckListboxItem::Register()
{
WindowFactoryManager& wfMgr = CEGUI::WindowFactoryManager::getSingleton();
wfMgr.addFactory(&CEGUI_WINDOW_FACTORY(CheckListboxItem));
wfMgr.addFalagardWindowMapping("TaharezLook/CheckListboxItem", "CEGUI/ItemEntry", "TaharezLook/CheckListboxItem", "Falagard/ItemEntry");
}
}
Then within the initialiseSample() function I inserted
Code: Select all
CheckListboxItem::Register();
Then I recompiled and ran PropertyFinder and lo and behold Levia's CheckListboxItem appears! Wicked.
Having given this thread a quick read, I'm excited about the potential of creating my own widgets. Now looking at the Levia examples I see that the custom widgets are all created in the CEGUI namespace. Is this required? I would think that we can create custom widgets within our application tier and "plug them in to cegui" as shown through the window manager registry.
Is this true? Am I interpreting this capability correctly and can we indeed begin to create our own custom widgets that conform to the cegui/falagard paradigm?
One widget that we are looking at implementing is a multi-state switch. The switch would allow you to clear on any one of the allowable states and the resulting "state changed callback" would be invoked with the correct state. This kind of thing could be constructed from several cegui widgets, but I'm thinking it would be cool to create a custom widget.
Is this true? Am I interpreting this capability correctly and can we indeed begin to create our own custom widgets that conform to the cegui/falagard paradigm?
One widget that we are looking at implementing is a multi-state switch. The switch would allow you to clear on any one of the allowable states and the resulting "state changed callback" would be invoked with the correct state. This kind of thing could be constructed from several cegui widgets, but I'm thinking it would be cool to create a custom widget.
Return to “Offtopic Discussion”
Who is online
Users browsing this forum: Bing [Bot] and 9 guests