设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2298|回复: 3
打印 上一主题 下一主题

[已经解决] 根据角色id排列!ID4以下显示在左边, ID4以上显示在右边?

[复制链接]

Lv3.寻梦者

梦石
0
星屑
3472
在线时间
878 小时
注册时间
2017-1-19
帖子
268
跳转到指定楼层
1
发表于 2019-10-16 15:11:43 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x

                                                   
  1. #==============================================================================
  2. # ■ VXAce-RGSS3-43 多人菜单画面 [Ver.1.0.2]       by Claimh
  3. #------------------------------------------------------------------------------
  4. # メニュー画面を個別Window化します
  5. #==============================================================================

  6. #==============================================================================
  7. # ■ 全般設定
  8. #==============================================================================
  9. module MenuEx3
  10.   # 纵向排列的最大个数
  11.   HMAX = 4

  12.   # 横向排列的最大个数
  13.   WMAX = 2

  14.   # キャラクター表示を使う
  15.   #   true  : 行走图表示
  16.   #   false : 头像表示
  17.   CHAR = true
  18.   
  19.   # HP/MP描画位置調整用
  20.   PX = 20
  21. end


  22. #==============================================================================
  23. # ■ キャラクター表示設定
  24. #------------------------------------------------------------------------------
  25. # ●戦闘不能时角色设定
  26. # ・初期値
  27. #   角色备注栏设定:
  28. #     @dead_c[文件名, index, キャラチップ内のindex]
  29. #      例) エリック   … @dead_c[Damage3,6,0]
  30. #          アーネスト … @dead_c[Damage3,7,0]
  31. #          ブレンダ   … @dead_c[Damage4,0,3]
  32. # ・変更時
  33. #   イベントスクリプトで変更
  34. #     set_dead_c(角色ID, "文件名", index, キャラチップ内のindex)
  35. #------------------------------------------------------------------------------
  36. # ●后台状态时角色
  37. # ・初期値
  38. #   角色备注栏设定:
  39. #     @badst_c[文件名, index, キャラチップ内のindex]
  40. #      例) エリック   … @badst_c[Damage3,6,1]
  41. #        アーネスト … @badst_c[Damage3,7,1]
  42. #          ブレンダ   … @badst_c[Damage4,0,4]
  43. # ・変更時
  44. #   事件脚本変更
  45. #     set_badst_c(角色ID, "文件名", index, キャラチップ内のindex)
  46. # ・バッドステート判定
  47. #   ステートのメモ欄にて設定
  48. #     @badst
  49. #==============================================================================
  50. module MoveActor
  51.   # 行走图朝向
  52.   #   2 : 正面
  53.   #   4 : 左向
  54.   #   6 : 右向
  55.   #   8 : 背面
  56.   CHAR_DIR = 2

  57.   # 行走图歩行动作
  58.   MOVE_CHAR = true

  59.   # 行走图歩行速度
  60.   MOVE_SPD = 20
  61. end


  62. #==============================================================================
  63. # ■ MoveCharData
  64. #==============================================================================
  65. class MoveCharData
  66.   #--------------------------------------------------------------------------
  67.   # ● 公開インスタンス変数
  68.   #--------------------------------------------------------------------------
  69.   attr_reader   :enabled        # 有効(戦闘メンバー)
  70.   attr_reader   :dead           # 戦闘不能
  71.   attr_reader   :badst          # バッドステート
  72.   attr_reader   :pending        # 保留状態
  73.   attr_reader   :pending_color  # 保留状態の背景色
  74.   attr_reader   :name           # グラフィック ファイル名
  75.   attr_reader   :index          # グラフィック インデックス
  76.   attr_reader   :pattern        # グラフィック パターン(正常時以外で使用)
  77.   #--------------------------------------------------------------------------
  78.   # ● オブジェクト初期化
  79.   #--------------------------------------------------------------------------
  80.   def initialize(actor, pending=false, pending_color=Color.new(0,0,0,0))
  81.     @enabled = $game_party.battle_members.include?(actor)
  82.     @pending = pending
  83.     @pending_color = pending_color
  84.     @dead  = actor.dead?
  85.     @badst = actor.badst?
  86.     if @dead
  87.       @name    = actor.dead_character_name
  88.       @index   = actor.dead_character_index
  89.       @pattern = actor.dead_character_pattern
  90.     elsif @badst
  91.       @name    = actor.badst_character_name
  92.       @index   = actor.badst_character_index
  93.       @pattern = actor.badst_character_pattern
  94.       self
  95.     else
  96.       @name    = actor.character_name
  97.       @index   = actor.character_index
  98.       @pattern = 0
  99.     end
  100.   end
  101.   #--------------------------------------------------------------------------
  102.   # ● 正常?
  103.   #--------------------------------------------------------------------------
  104.   def st_normal?
  105.     !(@dead or @badst)
  106.   end
  107. end

  108. #==============================================================================
  109. # ■ MoveCharacter
  110. #==============================================================================
  111. class MoveCharacter
  112.   include MoveActor
  113.   CHANGE  = MOVE_SPD * 4
  114.   MAX_CNT = MOVE_SPD * 4 * 4
  115.   #--------------------------------------------------------------------------
  116.   # ● 对象初始化
  117.   #--------------------------------------------------------------------------
  118.   def initialize(bitmap, rect, character)
  119.     @rect   = rect     # 描画範囲
  120.     @bitmap = bitmap   # 描画先ビットマップ
  121.     @count = MOVE_CHAR ? 0 : MOVE_SPD
  122.     set_char(character)
  123.   end
  124.   #--------------------------------------------------------------------------
  125.   # ● キャラクター設定
  126.   #--------------------------------------------------------------------------
  127.   def set_char(character, force=false)
  128.     @character = character
  129.     redraw_character(force)
  130.   end
  131.   #--------------------------------------------------------------------------
  132.   # ● キャラクター矩形(幅、高さ)
  133.   #--------------------------------------------------------------------------
  134.   def character_rect_base
  135.     b = Cache.character(@character.name)
  136.     sign = @character.name[/^[\!\$]./]
  137.     if sign && sign.include?('

  138. )
  139.       cw = b.width / 3
  140.       ch = b.height / 4
  141.     else
  142.       cw = b.width / 12
  143.       ch = b.height / 8
  144.     end
  145.     Rect.new(0, 0, cw, ch)
  146.   end
  147.   #--------------------------------------------------------------------------
  148.   # ● キャラクター矩形
  149.   #--------------------------------------------------------------------------
  150.   def character_rect(pattern)
  151.     rect = character_rect_base
  152.     if @character.dead or @character.badst
  153.       rect.x = (@character.index % 4 * 3 + @character.pattern % 3) * rect.width
  154.       rect.y = (@character.index / 4 * 4 + @character.pattern / 3) * rect.height
  155.     else
  156.       rect.x = (@character.index % 4 * 3 + pattern) * rect.width
  157.       rect.y = (@character.index / 4 * 4 + (CHAR_DIR - 2) / 2) * rect.height
  158.     end
  159.     rect
  160.   end
  161.   #--------------------------------------------------------------------------
  162.   # ● 背景を描画
  163.   #--------------------------------------------------------------------------
  164.   def draw_background
  165.     @bitmap.fill_rect(@rect, @character.pending_color)
  166.   end
  167.   #--------------------------------------------------------------------------
  168.   # ● キャラクター描画
  169.   #--------------------------------------------------------------------------
  170.   def draw_character(pattern)
  171.     return if @character.name == ""
  172.     pattern = 1 if pattern >= 3
  173.     src_rect = character_rect(pattern)
  174.     op = @character.enabled ? 255 : 160
  175.     @bitmap.blt(@rect.x, @rect.y, Cache.character(@character.name), src_rect, op)
  176.   end
  177.   #--------------------------------------------------------------------------
  178.   # ● キャラクター再描画
  179.   #--------------------------------------------------------------------------
  180.   def redraw_character(force=false)
  181.     return if [email protected]_normal? and !force
  182.     @bitmap.clear_rect(@rect)
  183.     draw_background if @character.pending
  184.     draw_character((@count / MOVE_SPD) % 4)
  185.   end
  186.   #--------------------------------------------------------------------------
  187.   # ● フレーム更新
  188.   #--------------------------------------------------------------------------
  189.   def update
  190.     return unless MOVE_CHAR
  191.     @count = (@count + 1) % MAX_CNT
  192.     redraw_character if (@count % MOVE_SPD) == 0
  193.   end
  194. end


  195. #==============================================================================
  196. # ■ Game_Actor
  197. #==============================================================================
  198. class Game_Actor < Game_Battler
  199.   #--------------------------------------------------------------------------
  200.   # ● 公開インスタンス変数
  201.   #--------------------------------------------------------------------------
  202.   attr_accessor  :dead_character_name      # 戦闘不能グラフィック ファイル名
  203.   attr_accessor  :dead_character_index     # 戦闘不能グラフィック インデックス
  204.   attr_accessor  :dead_character_pattern   # 戦闘不能グラフィック パターン
  205.   attr_accessor  :badst_character_name     # 戦闘不能グラフィック ファイル名
  206.   attr_accessor  :badst_character_index    # 戦闘不能グラフィック インデックス
  207.   attr_accessor  :badst_character_pattern  # 戦闘不能グラフィック パターン
  208.   #--------------------------------------------------------------------------
  209.   # ● セットアップ
  210.   #--------------------------------------------------------------------------
  211.   alias setup_move_actor setup
  212.   def setup(actor_id)
  213.     setup_move_actor(actor_id)
  214.     setup_dead_character(actor_id)
  215.     setup_badst_character(actor_id)
  216.   end
  217.   #--------------------------------------------------------------------------
  218.   # ● 戦闘不能グラフィック セットアップ
  219.   #--------------------------------------------------------------------------
  220.   def setup_dead_character(actor_id)
  221.     result = $data_actors[actor_id].note.scan(/@dead_c\[(.*?+),(\d+),(\d+)\]/i)
  222.     if result.nil? or result.empty?
  223.       @dead_character_name  = ""
  224.       @dead_character_index = @dead_character_pattern = 0
  225.     else
  226.       @dead_character_name    = result[0][0].to_s
  227.       @dead_character_index   = result[0][1].to_i
  228.       @dead_character_pattern = result[0][2].to_i
  229.     end
  230.   end
  231.   #--------------------------------------------------------------------------
  232.   # ● バッドステートグラフィック セットアップ
  233.   #--------------------------------------------------------------------------
  234.   def setup_badst_character(actor_id)
  235.     result = $data_actors[actor_id].note.scan(/@badst_c\[(.*?+),(\d+),(\d+)\]/i)
  236.     if result.nil? or result.empty?
  237.       @badst_character_name  = ""
  238.       @badst_character_index = @badst_character_pattern = 0
  239.     else
  240.       @badst_character_name    = result[0][0].to_s
  241.       @badst_character_index   = result[0][1].to_i
  242.       @badst_character_pattern = result[0][2].to_i
  243.     end
  244.   end
  245.   #--------------------------------------------------------------------------
  246.   # ● バッドステート?
  247.   #--------------------------------------------------------------------------
  248.   def badst?
  249.     states.any? {|s| s.note.include?("@badst")}
  250.   end
  251. end


  252. #==============================================================================
  253. # ■ Game_Interpreter
  254. #==============================================================================
  255. class Game_Interpreter
  256.   #--------------------------------------------------------------------------
  257.   # ● 戦闘不能時角色设定变更
  258.   #--------------------------------------------------------------------------
  259.   def set_dead_c(actor_id, name, index, pattern)
  260.     actor = $game_actors[actor_id]
  261.     actor.dead_character_name    = name
  262.     actor.dead_character_index   = index
  263.     actor.dead_character_pattern = pattern
  264.   end
  265.   #--------------------------------------------------------------------------
  266.   # ●バッドステート時のキャラクター変更
  267.   #--------------------------------------------------------------------------
  268.   def set_badst_c(actor_id, name, index, pattern)
  269.     actor = $game_actors[actor_id]
  270.     actor.badst_character_name    = name
  271.     actor.badst_character_index   = index
  272.     actor.badst_character_pattern = pattern
  273.   end
  274. end


  275. #==============================================================================
  276. # ■ Window_MenuOneActor
  277. #==============================================================================
  278. class Window_MenuOneActor < Window_Base
  279.   #--------------------------------------------------------------------------
  280.   # ● 公開インスタンス変数
  281.   #--------------------------------------------------------------------------
  282.   attr_accessor   :pending            # 保留状態(並び替え用)
  283.   #--------------------------------------------------------------------------
  284.   # ● オブジェクト初期化
  285.   #--------------------------------------------------------------------------
  286.   def initialize(x, y, index)
  287.     @offset_x = 160
  288.     @pending  = false
  289.     @index    = index
  290.     super(x, y, window_width, window_height)
  291.     create_char_object if MenuEx3::CHAR
  292.   end
  293.   #--------------------------------------------------------------------------
  294.   # ● キャラクターオブジェクト生成
  295.   #--------------------------------------------------------------------------
  296.   def create_char_object
  297.     h = contents.height - line_height
  298.     char_rect = Rect.new(12, line_height + (h - 32) / 2, 32, 32)
  299.     actor = $game_party.members[@index]
  300.     @char = MoveCharacter.new(contents, char_rect, MoveCharData.new(actor))
  301.   end
  302.   #--------------------------------------------------------------------------
  303.   # ● ウィンドウ幅の取得
  304.   #--------------------------------------------------------------------------
  305.   def window_width
  306.     (Graphics.width - @offset_x) / MenuEx3::WMAX
  307.   end
  308.   #--------------------------------------------------------------------------
  309.   # ● ウィンドウ高さの取得
  310.   #--------------------------------------------------------------------------
  311.   def window_height
  312.     Graphics.height / MenuEx3::HMAX
  313.   end
  314.   #--------------------------------------------------------------------------
  315.   # ● 項目の背景を描画
  316.   #--------------------------------------------------------------------------
  317.   def draw_item_background
  318.     contents.fill_rect(Rect.new(0,0,contents.width,contents.height), pending_color) if @pending
  319.   end
  320.   #--------------------------------------------------------------------------
  321.   # ● 顔グラフィックの描画
  322.   #     enabled : 有効フラグ。false のとき半透明で描画
  323.   #--------------------------------------------------------------------------
  324.   def draw_face(face_name, face_index, x, y, enabled = true)
  325.     bitmap = Cache.face(face_name)
  326.     h = contents.height - line_height - 4
  327.     sy = h < 96 ? ((96 - h) / 2) : 0
  328.     h  = h < 96 ? h : 96
  329.     rect = Rect.new(face_index % 4 * 96, face_index / 4 * 96 + sy, 96, h)
  330.     contents.blt(x, y, bitmap, rect, enabled ? 255 : translucent_alpha)
  331.     bitmap.dispose
  332.   end
  333.   #--------------------------------------------------------------------------
  334.   # ● 現在値/最大値を分数形式で描画
  335.   #     current : 現在値
  336.   #     max     : 最大値
  337.   #     color1  : 現在値の色
  338.   #     color2  : 最大値の色
  339.   #--------------------------------------------------------------------------
  340.   def draw_current_and_max_values(x, y, width, current, max, color1, color2)
  341.     change_color(color1)
  342.     xr = x + width
  343.     if width < 120  # 96では4桁表示でNGなので修正
  344.       draw_text(xr - 40, y, 42, line_height, current, 2)
  345.     else
  346.       draw_text(xr - 92, y, 42, line_height, current, 2)
  347.       change_color(color2)
  348.       draw_text(xr - 52, y, 12, line_height, "/", 2)
  349.       draw_text(xr - 42, y, 42, line_height, max, 2)
  350.     end
  351.   end
  352.   #--------------------------------------------------------------------------
  353.   # ● 項目の描画
  354.   #--------------------------------------------------------------------------
  355.   def refresh
  356.     contents.clear
  357.     actor = $game_party.members[@index]
  358.     enabled = $game_party.battle_members.include?(actor)
  359.     rect = Rect.new(0, 0, contents.width, contents.height)
  360.     draw_item_background
  361.     draw_actor_name(actor, 4, 0, rect.width - 60)
  362.     draw_actor_level(actor, rect.width - 56, 0)
  363.     if MenuEx3::CHAR
  364.       @char.set_char(MoveCharData.new(actor, @pending, pending_color), true)
  365.       x = 12 * 2 + 32 + 4
  366.     else
  367.       draw_actor_face(actor, 4, line_height, enabled)
  368.       x = (rect.width - 108) > 96 ? (rect.width - 96) : 102
  369.     end
  370.     if (rect.height - line_height) < (line_height * 3)
  371.       ic = false
  372.       h = (rect.height - line_height) / 2
  373.     else
  374.       ic = true
  375.       h = (rect.height - line_height - 2) / 3
  376.     end
  377.     x += MenuEx3::PX

  378.     w = rect.width - x - 4
  379.     draw_actor_hp(actor, x, line_height + h * 0, w)
  380.     draw_actor_mp(actor, x, line_height + h * 1, w)
  381.     if ic
  382.       draw_actor_icons(actor, x, line_height + h * 2, w)
  383.     elsif MenuEx3::CHAR
  384.       # CHARモードで2行表示になる場合はステートを表示しない
  385.       #draw_actor_icons(actor, 0, rect.height - line_height, 100)
  386.     else
  387.       draw_actor_icons(actor, 0, rect.height - line_height, 100)
  388.     end
  389.   end
  390.   #--------------------------------------------------------------------------
  391.   # ● カーソル有効/無効化
  392.   #--------------------------------------------------------------------------
  393.   def enable_cursor
  394.     cursor_rect.set(Rect.new(0, 0, contents.width, contents.height))
  395.   end
  396.   def disable_cursor
  397.     cursor_rect.empty
  398.   end
  399.   #--------------------------------------------------------------------------
  400.   # ● 保留状態の更新
  401.   #--------------------------------------------------------------------------
  402.   def pending=(flag)
  403.     @pending = flag
  404.     refresh
  405.   end
  406.   #--------------------------------------------------------------------------
  407.   # ● フレーム更新
  408.   #--------------------------------------------------------------------------
  409.   def update
  410.     super
  411.     @char.update if MenuEx3::CHAR
  412.   end
  413. end


  414. #==============================================================================
  415. # ■ Window_MenuStatusEx
  416. #==============================================================================
  417. class Window_MenuStatusEx < Window_Selectable
  418.   #--------------------------------------------------------------------------
  419.   # ● 公開インスタンス変数
  420.   #--------------------------------------------------------------------------
  421.   attr_reader   :pending_index            # 保留位置(並び替え用)
  422.   #--------------------------------------------------------------------------
  423.   # ● オブジェクト初期化
  424.   #--------------------------------------------------------------------------
  425.   def initialize(x, y)
  426.     @offset_x = 160
  427.     super(x, y, window_width, window_height)
  428.     create_windows
  429.     self.opacity = 0
  430.     @pending_index = -1
  431.     refresh
  432.   end
  433.   #--------------------------------------------------------------------------
  434.   # ● オブジェクト廃棄
  435.   #--------------------------------------------------------------------------
  436.   def dispose
  437.     @windows.each {|w| w.dispose}
  438.     super
  439.   end
  440.   #--------------------------------------------------------------------------
  441.   # ● ウィンドウの表示
  442.   #--------------------------------------------------------------------------
  443.   def show
  444.     @windows.each {|w| w.show}
  445.     super
  446.   end
  447.   #--------------------------------------------------------------------------
  448.   # ● ウィンドウの非表示
  449.   #--------------------------------------------------------------------------
  450.   def hide
  451.     @windows.each {|w| w.hide}
  452.     super
  453.   end
  454.   #--------------------------------------------------------------------------
  455.   # ● 桁数の取得
  456.   #--------------------------------------------------------------------------
  457.   def col_max
  458.     MenuEx3::WMAX
  459.   end
  460.   #--------------------------------------------------------------------------
  461.   # ● 個別ウィンドウの生成
  462.   #--------------------------------------------------------------------------
  463.   def create_windows
  464.     @windows = []
  465.     w = window_width  / MenuEx3::WMAX
  466.     h = window_height / MenuEx3::HMAX
  467.     item_max.times do |i|
  468.       x = @offset_x + w * (i % MenuEx3::WMAX)
  469.       y = h * (i / MenuEx3::WMAX)
  470.       @windows.push(Window_MenuOneActor.new(x, y, i))
  471.     end
  472.   end
  473.   #--------------------------------------------------------------------------
  474.   # ● ウィンドウ幅の取得
  475.   #--------------------------------------------------------------------------
  476.   def window_width
  477.     Graphics.width - @offset_x
  478.   end
  479.   #--------------------------------------------------------------------------
  480.   # ● ウィンドウ高さの取得
  481.   #--------------------------------------------------------------------------
  482.   def window_height
  483.     Graphics.height
  484.   end
  485.   #--------------------------------------------------------------------------
  486.   # ● 項目数の取得
  487.   #--------------------------------------------------------------------------
  488.   def item_max
  489.     $game_party.members.size
  490.   end
  491.   #--------------------------------------------------------------------------
  492.   # ● 項目の高さを取得
  493.   #--------------------------------------------------------------------------
  494.   def item_height
  495.     (Graphics.height - standard_padding * 2) / MenuEx3::HMAX
  496.   end
  497.   #--------------------------------------------------------------------------
  498.   # ● 項目の描画
  499.   #--------------------------------------------------------------------------
  500.   def draw_item(index)
  501.     @windows[index].refresh
  502.   end
  503.   #--------------------------------------------------------------------------
  504.   # ● カーソル位置の設定
  505.   #--------------------------------------------------------------------------
  506.   def index=(index)
  507.     @windows[@index].disable_cursor if @index >= 0
  508.     super(index)
  509.     @windows[@index].enable_cursor  if @index >= 0
  510.   end
  511.   #--------------------------------------------------------------------------
  512.   # ● 決定ボタンが押されたときの処理
  513.   #--------------------------------------------------------------------------
  514.   def process_ok
  515.     super
  516.     $game_party.menu_actor = $game_party.members[index]
  517.   end
  518.   #--------------------------------------------------------------------------
  519.   # ● 前回の選択位置を復帰
  520.   #--------------------------------------------------------------------------
  521.   def select_last
  522.     select($game_party.menu_actor.index || 0)
  523.   end
  524.   #--------------------------------------------------------------------------
  525.   # ● 保留位置(並び替え用)の更新
  526.   #--------------------------------------------------------------------------
  527.   def pending_index=(index)
  528.     @windows[@pending_index].pending = false if @pending_index >= 0
  529.     @pending_index = index
  530.     @windows[@pending_index].pending = true  if @pending_index >= 0
  531.   end
  532.   #--------------------------------------------------------------------------
  533.   # ● 先頭の行の設定
  534.   #--------------------------------------------------------------------------
  535.   def top_row=(row)
  536.     super(row)
  537.     h = window_height / MenuEx3::HMAX
  538.     item_max.times do |i|
  539.       @windows[i].y = h * (i / col_max - (top_row * col_max) / col_max)
  540.     end
  541.   end
  542.   #--------------------------------------------------------------------------
  543.   # ● フレーム更新
  544.   #--------------------------------------------------------------------------
  545.   def update
  546.     super
  547.     @windows.each {|w| w.update}
  548.   end
  549.   #--------------------------------------------------------------------------
  550.   # ● カーソルの更新
  551.   #--------------------------------------------------------------------------
  552.   def update_cursor
  553.     super
  554.     cursor_rect.empty   # カーソルは表示しない
  555.   end
  556. end


  557. #==============================================================================
  558. # ■ Scene_Menu
  559. #==============================================================================
  560. class Scene_Menu < Scene_MenuBase
  561.   #--------------------------------------------------------------------------
  562.   # ● ステータスウィンドウの作成
  563.   #--------------------------------------------------------------------------
  564.   def create_status_window
  565.     @status_window = Window_MenuStatusEx.new(@command_window.width, 0)
  566.   end
  567. end
复制代码


Lv4.逐梦者

梦石
0
星屑
9617
在线时间
566 小时
注册时间
2017-9-28
帖子
208
2
发表于 2019-10-17 20:39:59 | 只看该作者
修改 Window_MenuStatusEx#create_windows 如下:
  1.   #--------------------------------------------------------------------------
  2.   # ● 個別ウィンドウの生成
  3.   #--------------------------------------------------------------------------
  4.   def create_windows
  5.     @windows = []
  6.     w = window_width  / MenuEx3::WMAX
  7.     h = window_height / MenuEx3::HMAX
  8.     offset_y = Array.new(MenuEx3::WMAX, 0)
  9.     item_max.times do |i|
  10.       id = $game_party.members[i].id
  11.       x = @offset_x + w * ((id - 1) / MenuEx3::HMAX)
  12.       col = (id - 1) / MenuEx3::HMAX
  13.       y = (offset_y[col] += h) - h
  14.       @windows.push(Window_MenuOneActor.new(x, y, i))
  15.     end
  16.   end
复制代码
喵喵喵
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3472
在线时间
878 小时
注册时间
2017-1-19
帖子
268
3
 楼主| 发表于 2019-10-18 14:10:43 | 只看该作者
hyrious 发表于 2019-10-17 20:39
修改 Window_MenuStatusEx#create_windows 如下:

脚本有bug,当加入的角色id大于8时就会报错[在打开菜单时],你给的脚本这行
y = (offset_y[col] += h) - h报错
回复 支持 反对

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
9617
在线时间
566 小时
注册时间
2017-9-28
帖子
208
4
发表于 2019-10-18 19:25:10 | 只看该作者
shengfeng 发表于 2019-10-18 14:10
脚本有bug,当加入的角色id大于8时就会报错[在打开菜单时],你给的脚本这行
y = (offset_y[col] += h) -  ...


设置一个更大的 WMAX 就行了(不过第三列会出屏幕
或者你把 col = (id - 1) / MenuEx3::HMAX 这行改为(注意,是两行)
  1. col = (id - 1) / MenuEx3::HMAX
  2. col = [[col, 0].max, MenuEx3::WMAX - 1].min
复制代码

评分

参与人数 1星屑 +100 收起 理由
VIPArcher + 100 我很赞同

查看全部评分

喵喵喵
回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-4-25 20:06

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表