| 赞 | 7 |
| VIP | |
| 好人卡 | |
| 积分 | 32 |
| 经验 | |
| 最后登录 | 2026-9-4 |
| 在线时间 | 3619 小时 |
双子人
- 梦石
- 0
- 星屑
- 3205
- 在线时间
- 3619 小时
- 注册时间
- 2009-4-4
- 回帖
- 3901

|
发表于 2012-8-19 10:00:11
|
显示全部楼层
- def refresh
- self.contents.clear
- x = 4
- self.contents.font.color = normal_color
- cx = contents.text_size(@exp.to_s).width
- self.contents.draw_text(x, 0, cx, 32, @exp.to_s,对齐方式)
- x += cx + 4
- self.contents.font.color = system_color
- cx = contents.text_size("EXP").width
- self.contents.draw_text(x, 0, 64, 32, "EXP",对齐方式)
- x += cx + 16
- self.contents.font.color = normal_color
- cx = contents.text_size(@gold.to_s).width
- self.contents.draw_text(x, 0, cx, 32, @gold.to_s,对齐方式)
- x += cx + 4
- self.contents.font.color = system_color
- self.contents.draw_text(x, 0, 128, 32, $data_system.words.gold,对齐方式)
- y = 32
- for item in @treasures
- draw_item_name(item, 4, y)
- y += 32
- end
- end
复制代码 对齐方式:水平方向默认为左对齐,但是当 align 指定为 1 时为居中对齐,指定为 2 时为右对齐。垂直方向则总为居中对齐。
|
评分
-
查看全部评分
|