赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 70696 |
最后登录 | 2025-5-2 |
在线时间 | 124 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 147
- 在线时间
- 124 小时
- 注册时间
- 2008-2-9
- 帖子
- 267
|
#==============================================================================
# ■ Window_CurrentBGM_Volume
#==============================================================================
class Window_CurrentBGM_Volume < Window_Base
def initialize
super(460, 224, 180, 96)
self.windowskin = RPG::Cache.windowskin("../system/menu/windowskins/palskin")
self.opacity = 180
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 160
refresh
end
def refresh
self.contents.clear
self.contents.font.size = 20
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 160, 32, "音乐音量设置")
self.contents.font.color = normal_color
self.contents.draw_text(4, 32, 120, 32, $game_system.bgm_volume.to_s + "%", 2.9)
end
end
#==============================================================================
# ■ Window_BGM_Volume
#==============================================================================
class Window_BGM_Volume < Window_Selectable
def initialize(width, commands)
super(380, 64, width, commands.size * 32 + 32)
@item_max = commands.size
@commands = commands
self.windowskin = RPG::Cache.windowskin("../system/menu/windowskins/palskin")
self.opacity = 180
self.contents = Bitmap.new(width - 32, @item_max * 32)
self.back_opacity = 160
refresh
self.index = 0
end
def refresh
self.contents.clear
self.contents.font.size = 20
for i in 0...@item_max
draw_item(i, normal_color)
end
end
def draw_item(index, color)
self.contents.font.color = color
rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect, @commands[index])
end
def disable_item(index)
draw_item(index, disabled_color)
end
end
#==============================================================================
# ■ Window_CurrentSFX_Volume
#==============================================================================
class Window_CurrentSFX_Volume < Window_Base
def initialize
super(460, 224, 180, 96)
self.windowskin = RPG::Cache.windowskin("../system/menu/windowskins/palskin")
self.opacity = 180
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 160
refresh
end
def refresh
self.contents.font.size = 20
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 160, 32, "音效音量设置")
self.contents.font.color = normal_color
self.contents.draw_text(4, 32, 120, 32, $game_system.se_volume.to_s + "%", 2.9)
end
end
#==============================================================================
# ■ Window_SFX_Volume
#==============================================================================
class Window_SFX_Volume < Window_Selectable
def initialize(width, commands)
super(380, 64, width, commands.size * 32 + 32)
self.windowskin = RPG::Cache.windowskin("../system/menu/windowskins/palskin")
self.opacity = 180
@item_max = commands.size
@commands = commands
self.contents = Bitmap.new(width - 32, @item_max * 32)
self.back_opacity = 160
refresh
self.index = 0
end
def refresh
self.contents.clear
self.contents.font.size = 20
for i in 0...@item_max
draw_item(i, normal_color)
end
end
def draw_item(index, color)
self.contents.font.color = color
rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
self.contents.draw_text(rect, @commands[index])
end
def disable_item(index)
draw_item(index, disabled_color)
end
end
|
|