help on mygui

nevarim

09-10-2010 13:55:42

hi all
im trying to make my gui interface, but i have some problem:

code for a new widget is here

here i add my file on LE:core_theme_tag.xml

<Tag name="MyGUI_Theme_Texture">core.png</Tag>
<Tag name="bc_core_Texture">bc_core.png</Tag>

then in widget.xml i add line copy for new widget:

<Widget name="bc_Window">
<Property key="DefaultSkin" value="bc_Window"/>
<Property key="Skin" value="bc_Window"/>
<Property key="Skin" value="bc_WindowC"/>
<Property key="Skin" value="bc_WindowCS"/>
<Property key="Skin" value="bc_WindowCSX"/>
<Property key="Parent" value="true"/>
<Property key="Child" value="false"/>
<Parameter key="Window_AutoAlpha" value="Bool"/>
<Parameter key="Window_Snap" value="Bool"/>
<Parameter key="Window_MinSize" value="2 int"/>
<Parameter key="Window_MaxSize" value="2 int"/>
</Widget>

then in core_skin.xml


<Resource type="ResourceSkin" name = "bc_Window" size = "68 49" texture = "#{bc_core_Texture}" >
<Property key="ToStick" value = "true" />
<Child type="Button" skin="WindowCaptionDisable" offset = "0 0 68 28" align = "HStretch Top" name = "bc_Caption">
<Property key="Scale" value = "1 1 0 0"/>
</Child>
<Child type="Widget" skin="DefaultClient" offset = "4 31 58 12" align = "Stretch" name = "bc_Client"/>
<BasisSkin type="SubSkin" offset = "0 28 4 3" align = "Left Top">
<State name="normal" offset = "384 173 4 3"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "4 28 58 3" align = "HStretch Top">
<State name="normal" offset = "390 173 3 3"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "62 28 6 3" align = "Right Top">
<State name="normal" offset = "401 173 6 3"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "0 31 4 12" align = "Left VStretch">
<State name="normal" offset = "384 176 4 12"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "62 31 6 12" align = "Right VStretch">
<State name="normal" offset = "401 176 6 12"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "0 43 4 6" align = "Left Bottom">
<State name="normal" offset = "384 188 4 6"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "4 43 58 6" align = "HStretch Bottom">
<State name="normal" offset = "390 188 3 6"/>
</BasisSkin>
<BasisSkin type="SubSkin" offset = "62 43 6 6" align = "Right Bottom">
<State name="normal" offset = "401 188 6 6"/>
</BasisSkin>
</Resource>




but in the end i have the result that when i try to add in LE on graphic side the item i have nothing on screen than and when i pass over the item in popup i have name with widget: and the name in red


i'm getting crazy with this program, there isn't a method to write all this code automatically?


thanks :D

Nevarim

my.name

09-10-2010 15:07:30

try
<Widget name="Window"> // << this is widget type
<Property key="DefaultSkin" value="bc_Window"/>
<Property key="Skin" value="bc_Window"/>
<Property key="Skin" value="bc_WindowC"/>
<Property key="Skin" value="bc_WindowCS"/>
<Property key="Skin" value="bc_WindowCSX"/>
<Property key="Parent" value="true"/>
<Property key="Child" value="false"/>
<Parameter key="Window_AutoAlpha" value="Bool"/>
<Parameter key="Window_Snap" value="Bool"/>
<Parameter key="Window_MinSize" value="2 int"/>
<Parameter key="Window_MaxSize" value="2 int"/>
</Widget>

nevarim

09-10-2010 15:54:06

solved yes widget name is not customizable name of widget is to give in skin