查看: 2471|回复: 2

[已经解决] 喵5的對話內顯示選項!

[复制链接]
梦石
0
星屑
354
在线时间
127 小时
注册时间
2016-10-8
回帖
54
发表于 2018-6-16 00:37:06 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
腳本
  1. =begin
  2. ===============================================================================
  3.   对话框内显示选项 By喵呜喵5
  4. ===============================================================================

  5. 【说明】

  6.   仿照RMVX的模式,在对话框中显示选择的选项

  7.   原理很简单,只不过是把原来显示选项的窗口背景弄成透明的放在显示文字的对话框上而已

  8.   文字+选项的总行数超过对话最大允许行数时将在新一页中显示选项
  9. =end

  10. $m5script ||= {};$m5script[:M5CIM20141206] = 20160101
  11. class Window_Message
  12.   attr_reader :m5_20141206_cim
  13.   alias m5_20141206_process_character process_character
  14.   def process_character(c, text, pos)
  15.     m5_20141206_process_character(c, text, pos)
  16.     @m5_20141206_cim = pos
  17.   end
  18. end
  19. class Window_ChoiceList
  20.   def update_placement
  21.     self.width = Graphics.width
  22.     self.height = fitting_height($game_message.choices.size)
  23.     self.y = Graphics.height - self.height
  24.     self.z = @message_window.z + 1
  25.     self.opacity = 255
  26.     if @message_window.open?
  27.       pos = @message_window.m5_20141206_cim.clone
  28.       if pos[:y] + self.height > @message_window.height
  29.         @message_window.input_pause
  30.         @message_window.close
  31.         self.y = [@message_window.y, self.y].min
  32.       else
  33.         self.width -= @message_window.new_line_x
  34.         self.opacity = 0
  35.         self.y = @message_window.y + pos[:y]
  36.       end
  37.     end
  38.     self.x = Graphics.width - width
  39.   end
  40. end
复制代码


希望能加個開關來控制是否顯示,

有挖到篇老文但套用後沒有效果…

只好上來麻煩各位大佬幫忙
(´_ゝ`)...仍未命名的遊戲製作進度:0%

老鹰

梦石
40
星屑
38044
在线时间
7127 小时
注册时间
2012-5-26
回帖
3306

极短24评委极短23参与极短22参与极短21评委老司机慢点开短篇十吟唱者组别冠军开拓者剧作品鉴家

发表于 2018-6-16 16:52:40 | 显示全部楼层
class Window_ChoiceList
  alias eagle_old_choice_update_placement update_placement
  def update_placement
     return eagle_old_choice_update_placement if $game_switches[1]
    self.width = Graphics.width
    self.height = fitting_height($game_message.choices.size)
    self.y = Graphics.height - self.height
    self.z = @message_window.z + 1
    self.opacity = 255
    …………
  end
end

遇事不决看下将原本的方法重新保留回来呢?
红色地方新增到对应位置,1号开关开启时使用原有的位置更新方法

点评

測試可用!非常感謝飛柳大人!這對我來說還是太複雜...我只會非常簡易的改動(下跪)  发表于 2018-6-16 23:40

评分

参与人数 2星屑 +100 赞 +1 收起 理由
VIPArcher + 100 我很赞同
elemmy72 + 1 认可答案,感謝多次的幫助(下跪).

查看全部评分

回复 1 0

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部