Customizing windows and asdding properties


19-04-2017 18:28:16


I'm trying to create a new "alert" Window skin, with an Icon in the title.
The idea is to modify the button Image texture to show an alert icon, or nothing, or an stop icon, depending of the type of message.
I managed to add the image in the skin, but I don't know how to access the buttonImage to modify the texture by code.

Any idea?

Thanks !

My skin:
<Resource type="ResourceLayout" name="WindowAlert" version="3.2.0">
<Widget type="Widget" skin="PanelSkin" position="15 10 68 49" name="Root">
<Property key="Snap" value="true"/>
<Property key="Movable" value="false"/>
<UserString key="LE_TargetWidgetType" value="Window"/>
<Widget type="Widget" skin="PanelSkin" position="0 0 69 42" align="HStretch Top">
<Widget type="Button" skin="ButtonImage" position="2 3 36 36" name="alert_icon">
<Property key="ModeImage" value="true"/>
<Property key="ImageResource" value="pic_FlipVert"/>
<Widget type="TextBox" skin="TextBox" position="38 4 62 40" align="HStretch Center" name="Caption">
<Property key="TextColour" value="0.431373 0.431373 0.431373"/>
<Property key="TextAlign" value="Center"/>
<Property key="FontName" value="helvetica_roman.20"/>
<Widget type="Widget" skin="PanelSkin" position="0 40 68 20" align="Stretch">
<Widget type="Widget" skin="PanelEmpty" position="0 0 68 12" align="Stretch" name="Client"/>
<Widget type="Window" skin="Window" position="15 75 68 49">
<Property key="Caption" value="Text"/>