Project1
标题:
哎!谁有系统设置的脚本啊?
[打印本页]
作者:
这不是马甲
时间:
2008-8-10 03:49
提示:
作者被禁止或删除 内容自动屏蔽
作者:
这不是马甲
时间:
2008-8-10 03:50
提示:
作者被禁止或删除 内容自动屏蔽
作者:
这不是马甲
时间:
2008-8-10 03:54
提示:
作者被禁止或删除 内容自动屏蔽
作者:
魔尊重楼
时间:
2008-8-13 23:45
#==============================================================================
# ■ Window_SysCommand
#------------------------------------------------------------------------------
# 天书控制里的窗口。
#==============================================================================
class Window_SysCommand < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(460, 32, 180, 192)
self.windowskin = RPG::Cache.windowskin("../system/menu/windowskins/palskin")
self.opacity = 180
self.contents = Bitmap.new(width - 32, height - 32)
self.back_opacity = 160
@item_max = 5
@column_max = 1
@commands = ["音乐大小", "音效大小", "进入存档", "读取游戏", "退出江湖"]
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
bitmap = RPG::Cache.icon("bgm")
self.contents.blt(120, 4, bitmap, Rect.new(0, 0, 24, 24))
bitmap = RPG::Cache.icon("sfx")
self.contents.blt(120, 36, bitmap, Rect.new(0, 0, 24, 24))
bitmap = RPG::Cache.icon("save")
self.contents.blt(120, 68, bitmap, Rect.new(0, 0, 24, 24))
bitmap = RPG::Cache.icon("load")
self.contents.blt(120, 100, bitmap, Rect.new(0, 0, 24, 24))
bitmap = RPG::Cache.icon("exit")
self.contents.blt(120, 132, bitmap, Rect.new(0, 0, 24, 24))
for i in 0...@item_max
draw_item(i)
end
end
#--------------------------------------------------------------------------
# ● 描绘项目
# index : 项目编号
#--------------------------------------------------------------------------
def draw_item(index)
x = 4
y = 32 * index
self.contents.draw_text(x, y, 128, 32, @commands[index])
end
end
作者:
魔尊重楼
时间:
2008-8-13 23:46
#==============================================================================
# ■ Window_EndCommand
#------------------------------------------------------------------------------
# 天书里退出时的窗口。
#==============================================================================
class Window_EndCommand < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化对像
#--------------------------------------------------------------------------
def initialize
super(280, 128, 180, 96)
self.windowskin = RPG::Cache.windowskin("../system/menu/windowskins/palskin")
self.contents = Bitmap.new(width - 32, height - 32)
@item_max = 2
@column_max = 1
@commands = ["返回标题", "退出江湖"]
refresh
self.index = 0
self.back_opacity = 160
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
bitmap = RPG::Cache.icon("title")
self.contents.blt(120, 4, bitmap, Rect.new(0, 0, 24, 24))
bitmap = RPG::Cache.icon("desktop")
self.contents.blt(120, 36, bitmap, Rect.new(0, 0, 24, 24))
for i in 0...@item_max
draw_item(i)
end
end
#--------------------------------------------------------------------------
# ● 描绘项目
# index : 项目编号
#--------------------------------------------------------------------------
def draw_item(index)
x = 4
y = 32 * index
self.contents.draw_text(x, y, 128, 32, @commands[index])
end
end
[LINE]1,#dddddd[/LINE]
系统信息:本贴由本区版主认可为正确答案,66RPG感谢您的热情解答~
作者:
魔尊重楼
时间:
2008-8-13 23:46
#==============================================================================
# ■ 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
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1