本帖最后由 VIPArcher 于 2014-5-28 17:08 编辑
试试这个,能不能满足你的要求- #encoding:utf-8
- #==============================================================================
- # ■ Window_Task
- #------------------------------------------------------------------------------
- # 显示Task的窗口 LBQ
- #==============================================================================
- class Window_task < Window_Base
- #--------------------------------------------------------------------------
- # ● 初始化对象
- #--------------------------------------------------------------------------
- def initialize
- super(160,50, window_width, window_height)#160,50,
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 获取窗口的宽度
- #--------------------------------------------------------------------------
- def window_width
- return 384
- end
- #--------------------------------------------------------------------------
- # ● 获取窗口的高度
- #--------------------------------------------------------------------------
- def window_height
- return 48
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- contents.clear
- if $task==""
- $task="无"
- $task_information=""
- end
- draw_text_ex(0,0,"接下来: #{$task}")
- #draw_text_ex(0,48,$task)
- text_color(2)
-
- draw_text_ex(0,48,$task_information)
- end
- #--------------------------------------------------------------------------
- # ● 获取任务
- #--------------------------------------------------------------------------
- def task
- $task
- end
-
- #--------------------------------------------------------------------------
- # ● 打开窗口
- #--------------------------------------------------------------------------
- def open
- refresh
- super
- end
- end
复制代码 在 ·Scene_Menu 里17行添加create_task_window
以及在后面加这个#-------------------------------------------------------------------------- # ● 生成任务提示窗口 #-------------------------------------------------------------------------- def create_task_window @task_window = Window_task.new @task_window.x = 160 @task_window.y = Graphics.height - @task_window.height end
#--------------------------------------------------------------------------
# ● 生成任务提示窗口
#--------------------------------------------------------------------------
def create_task_window
@task_window = Window_task.new
@task_window.x = 160
@task_window.y = Graphics.height - @task_window.height
end
|