Итак У меня есть 8 изображений , которые я использую в своем веб-плеере в качестве фона для разных состояний кнопок.
У меня также есть что-то похожее на CSS-файл с объявлениями scaleGrid для правильного изменения размера:
/* CSS file */
mx|Button
{
disabledSkin: Embed(source="assets/Button_disabledSkin.png",
scaleGridTop="5",
scaleGridLeft="5",
scaleGridRight="59",
scaleGridBottom="17");
downSkin: Embed(source="assets/Button_downSkin.png",
scaleGridTop="5",
scaleGridLeft="5",
scaleGridRight="59",
scaleGridBottom="17");
overSkin: Embed(source="assets/Button_overSkin.png",
scaleGridTop="5",
scaleGridLeft="5",
scaleGridRight="59",
scaleGridBottom="17");
upSkin: Embed(source="assets/Button_upSkin.png",
scaleGridTop="5",
scaleGridLeft="5",
scaleGridRight="59",
scaleGridBottom="17");
selectedDisabledSkin: Embed(source="assets/Button_selectedDisabledSkin.png",
scaleGridTop="5",
scaleGridLeft="5",
scaleGridRight="59",
scaleGridBottom="17");
selectedDownSkin: Embed(source="assets/Button_selectedDownSkin.png",
scaleGridTop="5",
scaleGridLeft="5",
scaleGridRight="59",
scaleGridBottom="17");
selectedOverSkin: Embed(source="assets/Button_selectedUpSkin.png",
scaleGridTop="5",
scaleGridLeft="5",
scaleGridRight="59",
scaleGridBottom="17");
selectedUpSkin: Embed(source="assets/Button_selectedUpSkin.png",
scaleGridTop="5",
scaleGridLeft="5",
scaleGridRight="59",
scaleGridBottom="17");
}
Как сделать кнопку SDL с изменяемым размером (правильно), которая бы использовала мои активы и имела как минимум 4 состояния?