DUILIB 界面基本知识

normalimage="file='btn_open_mini.png' source='0,0,24,18'"

source :

1. 一张图片包含四种状态

2. normal image 截取'btn_open_mini.png'图片当中left, top ,right, bottom,[0,0,24,18]的区域,也就是第一种状态

hotimage="file='btn_open_mini.png' source='25,0,49,18'"

3. hot image 截取btn_open_mini.png, 当中第二种状态是从24+1(加一个像素是原图片上面有一个分隔线)

总结:

btn_open_mini.png大小 83*40

其是四种状态40*40 加上3条分隔线 ==> 83

float="true" pos="7,18,0,0" width="24" height="18"

float 为true即绝对布局

pos :控件从left, top :7,18开始布局,right ,bottom 为0,0则很width, height属性值,

则right = left + width, bottom = top + height

原文地址:https://www.cnblogs.com/pengxinglove/p/5225213.html