赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 2731 |
最后登录 | 2021-1-22 |
在线时间 | 132 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 115
- 在线时间
- 132 小时
- 注册时间
- 2009-9-16
- 帖子
- 60
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
怎么将这个脚本的时间显示弄进这个菜单里?
以下菜单脚本- class Window_Command_New < Window_Selectable
- def initialize(actors=4,enemynums=0)
- super(438, 20, 172, 160)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.opacity = HS::OPACITY
- @commands = ["精灵","道具","技能","加点","装备","队列","任务","系统"]
- @item_max = 8
- @column_max = 2
- @actors = actors
- @enemynums = enemynums
- draw_item(0, @actors==0 ? disabled_color : normal_color)
- draw_item(1, normal_color)
- draw_item(2, @actors==0 ? disabled_color : normal_color)
- draw_item(3, @actors==0 ? disabled_color : normal_color)
- draw_item(4, @actors==0 ? disabled_color : normal_color)
- draw_item(5, @actors==0 ? disabled_color : normal_color)
- draw_item(6, normal_color)
- draw_item(7, normal_color)
- self.index = 0
- end
- def draw_item(index, color)
- self.contents.font.color = color
- x = 4 + index % 2 * 70
- y = index / 2 * 32
- rect = Rect.new(x, y, 64, 32)
- self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
- self.contents.draw_text(rect, @commands[index], 1)
- end
- def update_cursor_rect
- x = 4 + index % 2 * 70
- y = index / 2 * 32
- self.cursor_rect.set(x, y, 64, 32)
- end
- end
- class Scene_Menu
- def initialize(menu_index = 0)
- @menu_index = menu_index
- end
- def main
- # check_enemy_in_map($game_player.x,$game_player.y)
- cmd = Window_Command_New.new($game_party.actors.size)
- cmd.index = @menu_index
- Graphics.transition
- loop do
- Graphics.update
- Input.update
- cmd.update
- if Input.trigger?(Input::B)
- $game_system.se_play($data_system.cancel_se)
- $scene = Scene_Map.new
- end
- if Input.trigger?(Input::C)
- case cmd.index
- when 0
- $game_system.se_play($data_system.decision_se)
- $scene = Scene_Status.new
- when 1
- $game_system.se_play($data_system.decision_se)
- $scene = Scene_Item.new
- when 2
- $game_system.se_play($data_system.decision_se)
- $scene = Scene_Skill.new
- when 3
- $game_system.se_play($data_system.decision_se)
- $scene = Scene_Lvup.new
- when 4
- $game_system.se_play($data_system.decision_se)
- $scene = Scene_Equip.new
- when 5
- $game_system.se_play($data_system.decision_se)
- $scene = Scene_Change_Turn.new
- when 6
- $game_system.se_play($data_system.decision_se)
- $scene = Scene_Task.new
- when 7
- $game_system.se_play($data_system.decision_se)
- $scene = Scene_Save.new
- end
- end
- if $scene != self
- break
- end
- end
- Graphics.freeze
- cmd.dispose
- end
- end
复制代码 下面时间显示脚本- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
- #==============================================================================
- # ■ Window_PlayTime
- #------------------------------------------------------------------------------
- # 菜单画面显示游戏时间的窗口。
- #==============================================================================
- class Window_PlayTime < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化对像
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 160, 128 )
- self.contents = Bitmap.new(width - 32, height - 32)
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- self.contents.font.color = system_color
- self.contents.draw_text(4, -4, 120, 32, "当前时间")
- @total_sec = Graphics.frame_count / Graphics.frame_rate
- t = Time.now
- $game_variables[204] = t.wday # 星期
- $game_variables[208] = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"][$game_variables[204]]
- text = sprintf("%02d:%02d:%02d", t.hour, t.min, t.sec)
- text2 = sprintf("%02d.%02d.%02d", t.year, t.month, t.day)
- text3 = sprintf($game_variables[208])
- self.contents.font.color = normal_color
- self.contents.draw_text(4, 24, 110, 32, text2, 2)
- self.contents.draw_text(-25, 48, 110, 32, text3, 2)
- self.contents.draw_text(-3, 72, 110, 32, text, 2)
- end
- #--------------------------------------------------------------------------
- # ● 刷新画面
- #--------------------------------------------------------------------------
- def update
- super
- if Graphics.frame_count / Graphics.frame_rate != @total_sec
- refresh
- end
- end
- end
- #==============================================================================
- # 本脚本来自www.66RPG.com,使用和转载请保留此信息
- #==============================================================================
复制代码 |
|