Skip to content

Instantly share code, notes, and snippets.

@bsideup
Created June 20, 2013 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bsideup/5825032 to your computer and use it in GitHub Desktop.
Save bsideup/5825032 to your computer and use it in GitHub Desktop.
<?xml version="1.0"?>
<containers:ContainerBase xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:image="ru.trylogic.gui.components.image.*"
xmlns:textfield="ru.trylogic.gui.components.textField.*"
xmlns:containers="ru.trylogic.gui.containers.*">
<fx:Metadata>
[HostComponent("ru.trylogic.gui.components.button.Button")]
</fx:Metadata>
<containers:states>
<s:State id="upState" name="up"/>
<s:State id="downState" name="down"/>
<s:State id="disabledState" name="disabled"/>
</containers:states>
<image:Image id="buttonImage" texture.up="{hostComponent.skinStyle.upTexture}"
texture.down="{hostComponent.skinStyle.downTexture || hostComponent.skinStyle.upTexture}"
texture.disabled="{hostComponent.skinStyle.disabledTexture || hostComponent.skinStyle.upTexture}"/>
<textfield:TextField id="label" text="{hostComponent.text}" x="{(buttonImage.width - label.width) * 0.5}" y="{(buttonImage.height - label.height) * 0.5}"
skinStyle="{hostComponent.skinStyle.textFieldSkinStyle}"/>
</containers:ContainerBase>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment