| 赞 | 2 |
| VIP | |
| 好人卡 | |
| 积分 | 20 |
| 经验 | |
| 最后登录 | 2025-2-12 |
| 在线时间 | 940 小时 |
- 梦石
- 0
- 星屑
- 2019
- 在线时间
- 940 小时
- 注册时间
- 2015-10-26
- 回帖
- 293

|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
模仿别的脚本写了个统计的页面,可以进入统计界面了,但是退不出来,而且文字都挤在一起了,求教是什么问题,咋改呀?
效果如题,在这里按ESC也退不出去,而且文字都挤在一起了
另外,窗口的内容没法往下滚动,如果项目多了,下面的就显示不出来了
麻烦高手帮忙解决这个问题呀~
- #==============================================================================
- # ** Window_Tongji
- #==============================================================================
- class Window_Tongji < Window_Selectable
- #----------------------------------------------------------------------------
- # * 初始化
- #----------------------------------------------------------------------------
- def initialize
- super(0, 0, Graphics.width, Graphics.height)
- refresh
- end
- #----------------------------------------------------------------------------
- # * 刷新画面
- #----------------------------------------------------------------------------
- def update
- super
- refresh
- end
- #----------------------------------------------------------------------------
- # * 更新内容
- #----------------------------------------------------------------------------
- def refresh
- self.contents.clear
- draw_text(x, y, 640, line_height, "统计", 1)
- draw_text(x, y, 350, line_height*3, "破敌数", 0)
- draw_text(x, y, 550, line_height*3, $game_variables[21], 2)
- draw_text(x, y, 350, line_height*4, "测试1", 0)
- draw_text(x, y, 550, line_height*4, $game_variables[21], 2)
- draw_text(x, y, 350, line_height*5, "测试2", 0)
- draw_text(x, y, 550, line_height*5, $game_variables[21], 2)
- draw_text(x, y, 350, line_height*6, "测试3", 0)
- draw_text(x, y, 550, line_height*6, $game_variables[21], 2)
- draw_text(x, y, 350, line_height*7, "测试4", 0)
- draw_text(x, y, 550, line_height*7, $game_variables[21], 2)
- draw_text(x, y, 350, line_height*8, "测试5", 0)
- draw_text(x, y, 550, line_height*8, $game_variables[21], 2)
- end
- end
- #----------------------------------------------------------------------------
- # * 呼叫界面
- #----------------------------------------------------------------------------
- class Call_Tongji < Scene_Base
- def start
- super
- create_tongji_window
- end
- #----------------------------------------------------------------------------
- # * 创建统计窗口
- #----------------------------------------------------------------------------
- def create_tongji_window
- @tongji_window = Window_Tongji.new
- @tongji_window.set_handler(:cancel,method(:return_scene))
- end
- end
复制代码 |
|