赞 | 1 |
VIP | 5 |
好人卡 | 4 |
积分 | 1 |
经验 | 23670 |
最后登录 | 2014-11-20 |
在线时间 | 378 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 378 小时
- 注册时间
- 2013-10-14
- 帖子
- 215
|
知道你伸手习惯了~!!
给你改好了~!!
自己研究下看看修改了什么~~!!- class Window_Jike < Window_Base
- JIKE_X = 380 # 窗口X坐标
- JIKE_Y = 20 # 窗口Y坐标
- JIKE_W = 220 # 窗口宽
- JIKE_H = 128 # 窗口高
- TEXT_COLOR = Color.new(255, 255, 255, 255) #字体颜色
- def initialize
- super(JIKE_X , JIKE_Y, JIKE_W, JIKE_H)
- self.opacity = 255 #边框透明度
- self.back_opacity = 155 #底色透明度
- self.contents_opacity = 200 #字透明度体
- self.contents = Bitmap.new(width - 32, height - 32)
- end
- def setname
- #这里可以改框内显示的文字和变量ID. ↓这是变量ID.. ↓这也是..
- ji_ke = "#{$game_variables[1]}/#{$game_variables[2]}"
- kou_ke = "#{$game_variables[3]}/#{$game_variables[4]}"
- jing_shen = "#{$game_variables[7]}/#{$game_variables[8]}"
- self.contents.clear
- self.contents.font.color = Color.new(255, 165, 0, 255)
- self.contents.draw_text(4, 0 ,128, 32, "饱食度:", 1)
- self.contents.font.color = Color.new(255, 255, 255, 255)
- self.contents.draw_text(80, 0 ,128, 32, ji_ke, 1)
- self.contents.font.color = Color.new(0, 191, 255, 255)
- self.contents.draw_text(4, 0 ,128, 96, "口渴度:", 1)
- self.contents.font.color = TEXT_COLOR
- self.contents.draw_text(80, 0 ,128, 96, kou_ke, 1)
- self.contents.font.color = Color.new(255, 0, 255, 255)
- self.contents.draw_text(4, 0 ,128, 160, "精神度:", 1)
- self.contents.font.color = TEXT_COLOR
- self.contents.draw_text(80, 0 ,128, 160, jing_shen, 1)
- end
- end
- class Window_Cunhuo < Window_Base
- def initialize
- super( 20, 20, 160, 64)
- self.opacity = 255 #边框透明度
- self.back_opacity = 155 #底色透明度
- self.contents_opacity = 200 #字透明度体
- self.contents = Bitmap.new(width - 32, height - 32)
- end
- def setname
- cun_huo = "#{$game_variables[9]}"
- self.contents.clear
- self.contents.font.color = Color.new(0, 255, 0, 255)
- self.contents.draw_text(4, 0 ,80, 32, "存活天数:", 1)
- self.contents.font.color = Color.new(255, 255, 255, 255)
- self.contents.draw_text(80, 0 ,32, 32, cun_huo, 1)
- end
- end
- class Scene_Map
- alias smn_main main
- def main
- @mapname = Window_Jike.new
- @mapname1 = Window_Cunhuo.new
- smn_main
- @mapname.dispose
- @mapname1.dispose
- end
- alias smn_update update
- def update
- @mapname.setname
- @mapname1.setname
- smn_update
- end
- end
- # by: Demon丶旋律
复制代码 顺便给你讲解下这句self.contents.draw_text(80, 0 ,32, 32, cun_huo, 1)
self.contents.draw_text(X坐标, Y坐标 ,宽, 高, "表达方式", 1)
需要引号~!
最后一个1我不知道如何解释~!
我自己知道如何用就对了~!! |
评分
-
查看全部评分
|