| 赞 | 2 |
| VIP | |
| 好人卡 | |
| 积分 | 18 |
| 经验 | |
| 最后登录 | 2026-5-24 |
| 在线时间 | 1313 小时 |
- 梦石
- 0
- 星屑
- 1788
- 在线时间
- 1313 小时
- 注册时间
- 2012-8-4
- 回帖
- 724
|
发表于 2016-4-8 13:17:00
|
显示全部楼层
本帖最后由 夜狠简单 于 2016-4-8 13:23 编辑
声望恶名
[pre lang="ruby"]
#插到mian之前
#声望窗口
class Window_Base < Window
def draw_currency_value1(value, x, y, width)
cx = contents.text_size(Vocab::gold).width
self.contents.font.color = normal_color
self.contents.draw_text(x, y, width-cx-2, WLH, value, 1)
self.contents.font.color = system_color
self.contents.draw_text(x, y, width, WLH, "声望", 2)
end
def draw_currency_value2(value, x, y, width)
cx = contents.text_size(Vocab::gold).width
self.contents.font.color = normal_color
self.contents.draw_text(x, y, width-cx-2, WLH, value, 1)
self.contents.font.color = system_color
self.contents.draw_text(x, y, width, WLH, "恶名", 2)
end
end
class Window_Sw < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
# x : 窗口 X 座标
# y : 窗口 Y 座标
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 160, WLH + 32)
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_currency_value1($game_variables[4], 4, 0, 120)
end
end
#恶名窗口
class Window_Em < Window_Base
#--------------------------------------------------------------------------
# ● 初始化对像
# x : 窗口 X 座标
# y : 窗口 Y 座标
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 160, WLH + 32)
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_currency_value2($game_variables[5], 4, 0, 120)
end
end
#菜单界面
class Scene_Menu < Scene_Base
alias start1 start
def start
start1
@gold_window1 = Window_Sw.new(0, 304)
@gold_window2 = Window_Em.new(0, 248)
end
alias terminate1 terminate
def terminate
terminate1
@gold_window1.dispose
@gold_window2.dispose
end
alias update1 update
def update
update1
@gold_window1.update
@gold_window2.update
end
end[/pre]
|
|