赞 | 18 |
VIP | 0 |
好人卡 | 2 |
积分 | 61 |
经验 | 28988 |
最后登录 | 2024-9-18 |
在线时间 | 1557 小时 |
Lv4.逐梦者
- 梦石
- 0
- 星屑
- 6117
- 在线时间
- 1557 小时
- 注册时间
- 2011-6-14
- 帖子
- 520
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
本帖最后由 347780682 于 2015-9-29 22:35 编辑
自己按照金钱脚本创建了一个窗口 但是出现了下面的情况 第一个0是白色的剩下的全是蓝色的 我想让他们全变白色 求解
#encoding:utf-8 #============================================================================== # ■ Window_Gold #------------------------------------------------------------------------------ # 显示持有金钱的窗口 #============================================================================== $a_id = 100 #显示变量的编号 $b_id = 101 #显示变量的编号 $c_id = 102 #显示变量的编号 $d_id = 103 #显示变量的编号 $e_id = 104 #显示变量的编号 $f_id = 105 #显示变量的编号 $g_id = 106 #显示变量的编号 class Window_Branch < Window_Base #-------------------------------------------------------------------------- # ● 初始化对象 #-------------------------------------------------------------------------- def initialize(x,y,w) super(x, y+45, w, fitting_height(1)+185) refresh end #-------------------------------------------------------------------------- # ● 获取窗口的宽度 #-------------------------------------------------------------------------- def window_width return 160 end #-------------------------------------------------------------------------- # ● 刷新 #-------------------------------------------------------------------------- def refresh contents.clear draw_currency_value(value,"SSS级支线", 14, 0, contents.width - 8) draw_currency_value(value1,"SS级支线", 14, 30, contents.width - 8) draw_currency_value(value2,"S级支线", 14, 60, contents.width - 8) draw_currency_value(value3,"A级支线", 14, 90, contents.width - 8) draw_currency_value(value4,"B级支线", 14, 120, contents.width - 8) draw_currency_value(value5,"C级支线", 14, 150, contents.width - 8) draw_currency_value(value6,"D级支线", 14, 180, contents.width - 8) end #-------------------------------------------------------------------------- # ● 获取持有金钱 #-------------------------------------------------------------------------- def value self.contents.draw_text(0,0,64-36,24,$game_variables[$a_id].to_s,1) end def value1 self.contents.draw_text(0,0,64-36,24+63,$game_variables[$b_id].to_s,1) end def value2 self.contents.draw_text(0,0,64-36,24+123,$game_variables[$c_id].to_s,1) end def value3 self.contents.draw_text(0,0,64-36,24+180,$game_variables[$d_id].to_s,1) end def value4 self.contents.draw_text(0,0,64-36,24+241,$game_variables[$e_id].to_s,1) end def value5 self.contents.draw_text(0,0,64-36,24+298,$game_variables[$f_id].to_s,1) end def value6 self.contents.draw_text(0,0,64-36,24+360,$game_variables[$g_id].to_s,1) end #-------------------------------------------------------------------------- # ● 获取货币单位 #-------------------------------------------------------------------------- def currency_unit Vocab::currency_unit end #-------------------------------------------------------------------------- # ● 打开窗口 #-------------------------------------------------------------------------- def open refresh super end end
#encoding:utf-8
#==============================================================================
# ■ Window_Gold
#------------------------------------------------------------------------------
# 显示持有金钱的窗口
#==============================================================================
$a_id = 100 #显示变量的编号
$b_id = 101 #显示变量的编号
$c_id = 102 #显示变量的编号
$d_id = 103 #显示变量的编号
$e_id = 104 #显示变量的编号
$f_id = 105 #显示变量的编号
$g_id = 106 #显示变量的编号
class Window_Branch < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对象
#--------------------------------------------------------------------------
def initialize(x,y,w)
super(x, y+45, w, fitting_height(1)+185)
refresh
end
#--------------------------------------------------------------------------
# ● 获取窗口的宽度
#--------------------------------------------------------------------------
def window_width
return 160
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
contents.clear
draw_currency_value(value,"SSS级支线", 14, 0, contents.width - 8)
draw_currency_value(value1,"SS级支线", 14, 30, contents.width - 8)
draw_currency_value(value2,"S级支线", 14, 60, contents.width - 8)
draw_currency_value(value3,"A级支线", 14, 90, contents.width - 8)
draw_currency_value(value4,"B级支线", 14, 120, contents.width - 8)
draw_currency_value(value5,"C级支线", 14, 150, contents.width - 8)
draw_currency_value(value6,"D级支线", 14, 180, contents.width - 8)
end
#--------------------------------------------------------------------------
# ● 获取持有金钱
#--------------------------------------------------------------------------
def value
self.contents.draw_text(0,0,64-36,24,$game_variables[$a_id].to_s,1)
end
def value1
self.contents.draw_text(0,0,64-36,24+63,$game_variables[$b_id].to_s,1)
end
def value2
self.contents.draw_text(0,0,64-36,24+123,$game_variables[$c_id].to_s,1)
end
def value3
self.contents.draw_text(0,0,64-36,24+180,$game_variables[$d_id].to_s,1)
end
def value4
self.contents.draw_text(0,0,64-36,24+241,$game_variables[$e_id].to_s,1)
end
def value5
self.contents.draw_text(0,0,64-36,24+298,$game_variables[$f_id].to_s,1)
end
def value6
self.contents.draw_text(0,0,64-36,24+360,$game_variables[$g_id].to_s,1)
end
#--------------------------------------------------------------------------
# ● 获取货币单位
#--------------------------------------------------------------------------
def currency_unit
Vocab::currency_unit
end
#--------------------------------------------------------------------------
# ● 打开窗口
#--------------------------------------------------------------------------
def open
refresh
super
end
end
|
|