It would be nice to be able to define user data in the layout files. We are attepting to use the NAME of the widget to store information but that is becoming extremely difficult as the system becomes more complex. And when dealing with Non-Techies, its very difficult for them to understand the extreme importance in getting the name of the the widiget correct and in the correct order. To simplify mine and their lives, here is what I think would be nice.
It would be nice to have the ability to set user data in the XML file using a KEY/VALUE pair. Here is an example:
Code: Select all
<Window Type="TaharezLook/Button" Name="FileDialog/OK">
<Property Name="AbsoluteRect" Value="l:12.000000 t:657.000000 r:115.000000 b:695.000000" />
<Property Name="RelativeRect" Value="l:0.011953 t:0.855052 r:0.111953 b:0.905052" />
<Property Name="Text" Value="OK" />
<Property Name="Visible" Value="True" />
<Property Name="KeyValue" KeyName="MyKeyName1" KeyData="MyKeyData1" />
<Property Name="KeyValue" KeyName="MyKeyName2" KeyData="MyKeyData2" />
<Property Name="KeyValue" KeyName="MyKeyName3" KeyData="MyKeyData3" />
</Window>
Note the KeyValue (call it anything you want, this is just an example). When CEGUI reads this in, it stores this information as a KEY/VALUE pair and the user will use an Interator or something to get this data. I would think the KEY/VALUE is stored at the CEGUI::Window level so that all widgets can have their own data.
Why do this? Well, it could make designing menus and screens alot more flexible and dynamic. You can bind user data and events to widgets and use a more univeral code. And it makes it easier for non-techies to edit the XML file too.
Anyway, just a suggestion.
