| 赞 | 93 |
| VIP | |
| 好人卡 | |
| 积分 | 80 |
| 经验 | |
| 最后登录 | 2026-3-26 |
| 在线时间 | 1184 小时 |
- 梦石
- 0
- 星屑
- 8003
- 在线时间
- 1184 小时
- 注册时间
- 2007-7-29
- 回帖
- 2014
|
发表于 2020-3-16 09:08:10
|
显示全部楼层
本帖最后由 enghao_lim 于 2020-3-16 20:50 编辑
我就说我怎么看这脚本越看越熟悉,原来是我当年写的啊,
估计后来被改成文字了,当初写的没记错是现实图标。
稍微改了下就变成多个显示了,具体都有注释,自己研究看看。
脚本- #------------------------------------------------------------------------
- # 非法用户【编写】
- #------------------------------------------------------------------------
- module LimSimpleWin
- Window = [
- {
- "text" => "小时",
- "switch_id" => 1,
- "variable_id" => 1
- },
- {
- "text" => "分钟",
- "switch_id" => 2,
- "variable_id" => 2
- },
- ]
- end
- #------------------------------------------------------------------------
- # 新建窗口
- class Window_Variables < Window_Base
- # 初始化
- def initialize(sequence, text, switch_id, variable_id)
- # 创建大小
- super(448,368 - ((LimSimpleWin::Window.size - sequence - 1) * 48),96,48)
- @sequence = sequence
- @text = text
- @switch_id = switch_id
- @switch_value = nil
- @variable_id = variable_id
- @variable_value = nil
- # 刷新
- refresh
- # 初始化结束
- end
- # 刷新
- def refresh
- # 开关检查
- if @swich_value != $game_switches[@switch_id]
- @switch_value = $game_switches[@switch_id]
- if (@switch_value)
- self.visible = true
- else
- self.visible = false
- end
- end
- # 在图表与变量都有变化的情况下
- if @variable_value != $game_variables[@variable_id]
- # 清楚内容
- self.contents.clear
- # 描绘文字
- self.contents.draw_text(0,0,64,24,@text)
- # 描绘变量,偏右
- self.contents.draw_text(0,0,64,24,$game_variables[@variable_id].to_s,2)
- # 带入变量
- @variable_value = $game_variables[@variable_id]
- # if 结束
- end
- # 刷新结束
- end
- # class 结束
- end
- # 地图生成窗口
- class Scene_Map < Scene_Base
- # 生成窗口
- alias new_start start
- def start
- new_start
- @varia_window = []
- for i in 0...LimSimpleWin::Window.size
- w = LimSimpleWin::Window[i]
- @varia_window.push(Window_Variables.new(i, w["text"], w["switch_id"], w["variable_id"]))
- end
- end
- # 刷新窗口
- alias new_update update
- def update
- new_update
- @varia_window.each do |w| w.refresh() end
- end
- # 释放窗口
- alias new_terminate terminate
- def terminate
- @varia_window.each do |w| w.dispose() end
- new_terminate
- end
- # class 结束
- end
复制代码
话说我上一个回复是做一个框多描述,根据你的要求要多框,简单的方法就是多开一个新的窗口。 |
|