开发者

SDL: I have 8 images, and some css rules, how to create a button?

So I have 8 images that I use in my web player as backgrounds for difrent button states. I also have something alike CSS file with sca开发者_Go百科leGrid declarations for correct resize:

    /* 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");

    }

How to make a resizable (correctly) button in SDL that would use my assets and have at least 4 states?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜