Property Finder

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Property Finder

Postby Rackle » Sat Apr 28, 2007 03:04

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
Last edited by Rackle on Fri Jun 29, 2007 17:37, edited 4 times in total.

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Sat Apr 28, 2007 09:40

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 ;)

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Sat Apr 28, 2007 12:18

I put my executable in CEGUI_head\bin rather than CEGUI_head\Samples\bin. I'll "standardize" to the samples directory.

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Sat Apr 28, 2007 14:08

Don't worry! :) I was just wondering.

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Tue May 01, 2007 01:36

Added an export button and coded the Wiki format. The result of that export is Wikied.

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Wed May 02, 2007 16:24

The table of properties under each widget shows Falagard properties in a different color. However I can't seem to figure out how to put colors in the Properties section of the Wiki.

User avatar
Levia
Quite a regular
Quite a regular
Posts: 83
Joined: Mon May 22, 2006 18:25
Location: Bergen op zoom, The Netherlands
Contact:

Postby Levia » Wed May 02, 2007 17:13

Thats just..stunning. Awesome job done there mate!
Image
Image

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Wed May 02, 2007 21:40

haha man, you're incredible, that's just great ! This will help people a lot !

Edit: maybe you should link both wiki-pages together ? I mean the property finder page and the set property page ?

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Thu May 03, 2007 16:53

Figured out how to put colors in the Properties section of the Wiki:

Code: Select all

<font COLOR=\"#FFBF00\">Falagard</font>

Pompei2
Home away from home
Home away from home
Posts: 489
Joined: Tue May 23, 2006 16:31

Postby Pompei2 » Thu May 03, 2007 21:58

oh, by the way, I added links to both of your wiki entries into the FAQ, Section 3.6

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Fri May 04, 2007 02:35

Good move.

daves
Home away from home
Home away from home
Posts: 253
Joined: Thu Feb 02, 2006 20:12

Postby daves » Fri May 04, 2007 19:45

This seems quite useful. I will look into using it.

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Wed May 09, 2007 17:06

How to integrate non-Cegui widgets

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.

daves
Home away from home
Home away from home
Posts: 253
Joined: Thu Feb 02, 2006 20:12

Postby daves » Wed May 23, 2007 00:53

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.

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Wed May 23, 2007 10:58

The best answer I can give is "I don't know". Try a simple case and see how that works. If there are problems post about it. Well, also post about it if there aren't any problems :D


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 4 guests