SDL:我有 8 个图像和一些 css 规则,如何创建按钮?
因此,我有 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");
}
How to make a ressized (rightly) Button in SDL that will use my asset and has at at at at at the right of 4 states?
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 scaleGrid 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论