赞 | 274 |
VIP | 0 |
好人卡 | 0 |
积分 | 158 |
经验 | 515 |
最后登录 | 2024-11-8 |
在线时间 | 2106 小时 |
Lv4.逐梦者
- 梦石
- 1
- 星屑
- 14790
- 在线时间
- 2106 小时
- 注册时间
- 2017-9-28
- 帖子
- 662
|
- # =============================================================================
- # TheoAllen - 弹出指令帮助
- # Version : 1.0
- # Contact : www.rpgmakerid.com (or) http://theolized.blogspot.com
- # (This script documentation is written in informal indonesian language)
- # =============================================================================
- ($imported ||= {})[:Theo_CommandHelp] = true
- # =============================================================================
- # Change Logs:
- # -----------------------------------------------------------------------------
- # 2014.03.12 - Finished Script
- # =============================================================================
- =begin
- 介绍:
- 该脚本可以通过一个按键,给主菜单/战斗甚至是标题画面的选项显示一个
- 详细帮助的窗口
-
- 使用方法:
- 插入到插件脚本之下,Main之上
- 编辑下方的设置
-
- 使用条款 :
- 署名脚本作者, TheoAllen. 你可以自由编辑此脚本,只要你不声明你是脚本的原作者
- 如果你想用此脚本于商业游戏,请和我共享收益.别忘了给我一份免费的游戏拷贝.
-
- =end
- # =============================================================================
- # 设定部分
- # =============================================================================
- module Theo
- module CmnHelp
-
- # ------------------------------------------------------------------------
- # 在这里按以下的格式定义
- # "指令名称" => "显示的帮助"
- #
- # ------------------------------------------------------------------------
- List = {
- "装备" => "更换装备",
- "物品" => "查看背包中的物品",
- "特技" => "查看已学会的特技(按shift键可移动到未用区)",
- "魔法" => "查看已学会的魔法(按shift键可移动到未用区)",
- "加点" => "分配角色属性点",
- "状态" => "查看角色状态",
- "整队" => "调整队员位置",
- "技能" => "查看角色的技能",
- "未用" => "查看未使用的技能",
- "继续" => "读取你的存档",
- "护甲" => "查看背包中的护甲",
- "武器" => "查看背包中的武器",
- "全部卸下" => "全部卸下身上的装备",
- "更换装备" => "更换角色装备",
- "护甲" => "查看背包中的护甲",
- "删除" => "删除存档",
- "存档" => "保存游戏进度",
- "载入" => "读取游戏进度",
- "系统" => "改变系统设置",
- "加点" => "分配角色属性点",
- }
-
- Button = :ALT # 显示帮助的按键
- ShowTime = 120 # 帮助文本显示的时间,单位为帧(1秒 = 60帧)
-
- end
- end
- # =============================================================================
- # 设定结束
- # =============================================================================
- class Window_Command < Window_Selectable
-
- alias theo_cmhelp_init initialize
- def initialize(*args)
- theo_cmhelp_init(*args)
- @cmn_help = Window_CommandHelp.new(viewport)
- end
-
- alias theo_cmhelp_update update
- def update
- theo_cmhelp_update
- @cmn_help.update
- end
-
- alias theo_cmhelp_dispose dispose
- def dispose
- theo_cmhelp_dispose
- @cmn_help.dispose
- end
-
- alias theo_cmhelp_process_handling process_handling
- def process_handling
- theo_cmhelp_process_handling
- return unless open? && active
- return show_help if help_avalaible? && Input.trigger?(Theo::CmnHelp::Button)
- end
-
- def show_help
- @cmn_help.show(Theo::CmnHelp::List[command_name(index)])
- end
-
- def help_avalaible?
- Theo::CmnHelp::List.include?(command_name(index))
- end
-
- end
- class Window_CommandHelp < Window_Base
-
- def initialize(viewport)
- super(0,0,1,fitting_height(1))
- self.viewport = viewport
- self.openness = 0
- self.z = 999
- @text = ""
- @show_time = 0
- end
-
- def show(help)
- @text = help
- resize_window
- update_position
- draw_text_ex(0,0,@text)
- self.openness = 0
- @show_time = Theo::CmnHelp::ShowTime
- end
-
- def resize_window
- size = text_size(@text)
- new_w = size.width + (standard_padding * 2) + 2
- new_h = size.height + standard_padding * 2
- self.width = new_w
- self.height = new_h
- create_contents
- end
-
- def update_position
- self.x = (Graphics.width - width)/2
- self.y = (Graphics.height - height)/2
- end
-
- def update
- super
- update_showtime
- end
-
- def update_showtime
- if @show_time > 0
- open
- else
- close
- end
- @show_time -= 1
- end
-
- end
复制代码 |
|