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

Project1

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

[已经过期] 这个自定义脚本请看看为什么无法整队

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
251 小时
注册时间
2010-7-22
帖子
88
跳转到指定楼层
1
发表于 2015-5-21 16:48:24 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
  1. #******************************************************************************
  2. #
  3. #   * メニュー画面改変 *
  4. #
  5. #                       for RGSS3
  6. #
  7. #        Ver 1.00 2014.06.14
  8. #
  9. #   提供者:睡工房 http://hime.be/
  10. #
  11. #******************************************************************************

  12. =begin
  13.   メニュー画面の見た目と機能を変更します。
  14.   要求仕様はエクセル参照
  15. =end

  16. #==============================================================================
  17. # コンフィグ項目
  18. #==============================================================================
  19. module SUI
  20. module MENU_LAYOUT
  21.   # ステータス表示部の高さ
  22.   HEIGHT = 110
  23.   
  24.   # 全ウィンドウを一時消去するボタン
  25.   BUTTON = :A
  26.   
  27.   # ニックネーム表示設定
  28.   # :max … 表示可能最大文字数。長いニックネームはこの文字数でカットされ、
  29.   #    「ニックネーム~」の形式で表示されます。
  30.   NICKNAME = {:x => 0, :y => 0, :max => 6}
  31.   
  32.   # 名前表示設定
  33.   NAME = {:x => 0, :y => 24, :w => 85}
  34.   
  35.   # 歩行グラフィック表示設定
  36.   # :speed … 歩行アニメーションの早さ
  37.   WALK = {:x => 25, :y => 80, :speed => 15}
  38.   
  39.   # ステートの表示設定
  40.   # :size … 一度に表示できるアイコンの数
  41.   # :speed … 表示できないアイコンがある場合のループするスピード
  42.   # :duration … アイコンが1個ずれる度にループを一時停止する時間
  43.   # :durationを0に設定すると常にくるくる回ります。
  44.   STATE = {:x => 50, :y => 55, :size => 3, :speed => 15, :duration => 30}
  45.   
  46.   # HP・MPゲージの表示設定
  47.   HP = {:x => 85, :y => 32, :w => 40}
  48.   MP = {:x => 90, :y => 40, :w => 40}
  49.   
  50.   # メニューコマンドの下地画像
  51.   # Graphics/systemフォルダに画像を保存してください。
  52.   COMMAND_BASE = "command_base"
  53.   
  54.   # 1つ下のメニューコマンドのずらし量
  55.   COMMAND_MARGIN = 6
  56. end
  57. end


  58. #==============================================================================
  59. # 設定完了
  60. #==============================================================================
  61. class Sprite_SuiCommand < Sprite
  62.   include SUI::MENU_LAYOUT
  63.   #--------------------------------------------------------------------------
  64.   # ● クラス変数
  65.   #--------------------------------------------------------------------------
  66.   @@command_count = 0
  67.   #--------------------------------------------------------------------------
  68.   # ● コマンド選択位置の初期化(クラスメソッド)
  69.   #--------------------------------------------------------------------------
  70.   def self.reset
  71.     @@command_count = 0
  72.   end
  73.   #--------------------------------------------------------------------------
  74.   # ● オブジェクト初期化
  75.   #--------------------------------------------------------------------------
  76.   def initialize(item, viewport = nil)
  77.     super(viewport)
  78.     self.bitmap = Cache.system(COMMAND_BASE).clone
  79.     self.x -= COMMAND_MARGIN * @@command_count + 15
  80.     self.y = self.height * @@command_count
  81.     draw_command_name(item)
  82.     @offset = 0
  83.     @duration = 10 + @@command_count
  84.     @org_ox = self.width + (self.width / 5.0) * @@command_count
  85.     @speed = @org_ox / @duration
  86.     @@command_count += 1
  87.     self.ox = @org_ox + @offset
  88.   end
  89.   #--------------------------------------------------------------------------
  90.   # ○ コマンド名描画
  91.   #--------------------------------------------------------------------------
  92.   def draw_command_name(item)
  93.     self.bitmap.font.color.alpha = item[:enabled] ? 255 : 128
  94.     self.bitmap.font.size = 22
  95.     rect = self.bitmap.rect.clone
  96.     rect.width -= 5
  97.     rect.height = 22
  98.     rect.y = (self.height - rect.height) / 2
  99.     self.bitmap.draw_text(rect, item[:name], 2)
  100.   end
  101.   #--------------------------------------------------------------------------
  102.   # ○ 選択
  103.   #--------------------------------------------------------------------------
  104.   def select(flg)
  105.     @offset = flg ? -15 : 0
  106.   end
  107.   #--------------------------------------------------------------------------
  108.   # ● フレーム更新
  109.   #--------------------------------------------------------------------------
  110.   def update
  111.     super
  112.     if @duration > 0
  113.       @org_ox -= @speed
  114.       @org_ox = 0 if @org_ox < 0
  115.       @duration -= 1
  116.     end
  117.     self.ox = @org_ox + @offset
  118.   end
  119. end


  120. class Window_MenuCommand < Window_Command
  121.   include SUI::MENU_LAYOUT
  122.   #--------------------------------------------------------------------------
  123.   # ● オブジェクト初期化
  124.   #--------------------------------------------------------------------------
  125.   alias sui_layout_initialize initialize
  126.   def initialize
  127.     sui_layout_initialize
  128.     self.opacity = 0
  129.   end
  130.   #--------------------------------------------------------------------------
  131.   # ● 解放
  132.   #--------------------------------------------------------------------------
  133.   def dispose
  134.     super
  135.     @list.each {|item| item[:sprite].dispose if item[:sprite]}
  136.   end
  137.   #--------------------------------------------------------------------------
  138.   # ● ウィンドウの可視状態
  139.   #--------------------------------------------------------------------------
  140.   def visible=(flg)
  141.     super
  142.     @list.each {|item| item[:sprite].visible = flg if item[:sprite]}
  143.   end
  144.   #--------------------------------------------------------------------------
  145.   # ● コマンドリストのクリア
  146.   #--------------------------------------------------------------------------
  147.   alias sui_layout_clear_command_list clear_command_list
  148.   def clear_command_list
  149.     if @list
  150.       @list.each {|item| item[:sprite].dispose if item[:sprite]}
  151.     end
  152.     Sprite_SuiCommand.reset
  153.     sui_layout_clear_command_list
  154.   end
  155.   #--------------------------------------------------------------------------
  156.   # ● 項目の描画
  157.   #--------------------------------------------------------------------------
  158.   def draw_item(index)
  159.     sprite = Sprite_SuiCommand.new(@list[index])
  160.     @list[index][:sprite] = sprite
  161.   end
  162.   #--------------------------------------------------------------------------
  163.   # ● 項目を描画する矩形の取得
  164.   #--------------------------------------------------------------------------
  165.   def item_rect(index)
  166.     height = Cache.system(COMMAND_BASE).height
  167.     rect = Rect.new
  168.     rect.width = 0
  169.     rect.height = height
  170.     rect.x = index % col_max * (item_width + spacing)
  171.     rect.y = index / col_max * height - standard_padding - 5
  172.     rect
  173.   end
  174.   #--------------------------------------------------------------------------
  175.   # ● フレーム更新
  176.   #--------------------------------------------------------------------------
  177.   def update
  178.     super
  179.     if @list
  180.       @list.each {|item| item[:sprite].update if item[:sprite]}
  181.     end
  182.   end
  183.   #--------------------------------------------------------------------------
  184.   # ● 項目の選択
  185.   #--------------------------------------------------------------------------
  186.   def select(index)
  187.     @list[self.index][:sprite].select(false) if @list[self.index][:sprite]
  188.     super
  189.     @list[self.index][:sprite].select(true) if @list[self.index][:sprite]
  190.   end
  191. end


  192. class Window_SuiActorStatus < Window_Base
  193.   include SUI::MENU_LAYOUT
  194.   #--------------------------------------------------------------------------
  195.   # ● クラス変数
  196.   #--------------------------------------------------------------------------
  197.   @@count = 0
  198.   #--------------------------------------------------------------------------
  199.   # ● コマンド選択位置の初期化(クラスメソッド)
  200.   #--------------------------------------------------------------------------
  201.   def self.reset
  202.     @@count = 0
  203.   end
  204.   #--------------------------------------------------------------------------
  205.   # ● オブジェクト初期化
  206.   #--------------------------------------------------------------------------
  207.   def initialize
  208.     super(0, 0, window_width, window_height)
  209.     @move_speed = 26.0 / STATE[:speed]
  210.     @first_delay = 30
  211.    
  212.     @duration = 10 + @@count * 2
  213.     @org_oy = self.height + (self.height / 3.0) * @@count
  214.     @speed = @org_oy / @duration
  215.     @@count += 1
  216.     self.y = Graphics.height - self.height + @org_oy
  217.   end
  218.   #--------------------------------------------------------------------------
  219.   # ● ウィンドウ幅の取得
  220.   #--------------------------------------------------------------------------
  221.   def window_width
  222.     Graphics.width / 4
  223.   end
  224.   #--------------------------------------------------------------------------
  225.   # ● ウィンドウ高さの取得
  226.   #--------------------------------------------------------------------------
  227.   def window_height
  228.     HEIGHT
  229.   end
  230.   #--------------------------------------------------------------------------
  231.   # ○ 選択
  232.   #--------------------------------------------------------------------------
  233.   def select(flg)
  234.     if flg
  235.       cursor_rect.width = contents.width
  236.       cursor_rect.height = contents.height
  237.     else
  238.       cursor_rect.empty
  239.     end
  240.   end
  241.   #--------------------------------------------------------------------------
  242.   # ● リフレッシュ
  243.   #--------------------------------------------------------------------------
  244.   def refresh(actor)
  245.     contents.clear
  246.     draw_sui_nickname(actor)
  247.     draw_sui_name(actor)
  248.     draw_sui_hp_mp(actor)
  249.     draw_sui_state(actor)
  250.     @character_name = actor.character_name
  251.     @character_index = actor.character_index
  252.     @pattern = 0
  253.     @walk_duration = 0
  254.     @state_duration = 0
  255.     @state_index = 0
  256.     @offset_x = 0.0
  257.   end
  258.   #--------------------------------------------------------------------------
  259.   # ○ 二つ名の描画
  260.   #--------------------------------------------------------------------------
  261.   def draw_sui_nickname(actor)
  262.     change_color(normal_color)
  263.     text = actor.nickname
  264.     text = text[0, NICKNAME[:max]] + "~" if text.size > NICKNAME[:max]
  265.     draw_text(NICKNAME[:x], NICKNAME[:y], contents.width, line_height, text)
  266.   end
  267.   #--------------------------------------------------------------------------
  268.   # ○ 名前の描画
  269.   #--------------------------------------------------------------------------
  270.   def draw_sui_name(actor)
  271.     draw_actor_name(actor, NAME[:x], NAME[:y], NAME[:w])
  272.   end
  273.   #--------------------------------------------------------------------------
  274.   # ○ HPMPゲージの描画
  275.   #--------------------------------------------------------------------------
  276.   def draw_sui_hp_mp(actor)
  277.     y = HP[:y] - (line_height - 8)
  278.     draw_gauge(HP[:x], y, HP[:w], actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
  279.     y = MP[:y] - (line_height - 8)
  280.     draw_gauge(MP[:x], y, MP[:w], actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
  281.   end
  282.   #--------------------------------------------------------------------------
  283.   # ○ ステートの描画
  284.   #--------------------------------------------------------------------------
  285.   def draw_sui_state(actor)
  286.     contents.clear_rect(STATE[:x], STATE[:y], 26 * STATE[:size], 24)
  287.     icon = Cache.system("Iconset")
  288.     @state_size = actor.state_icons.size
  289.     @states.dispose if @states
  290.     @states = nil
  291.     actor.state_icons.each_with_index do |state, index|
  292.       @states ||= Bitmap.new(26 * actor.state_icons.size, 24)
  293.       rect = Rect.new(state % 16 * 24, state / 16 * 24, 24, 24)
  294.       @states.blt(26 * index, 0, icon, rect)
  295.     end
  296.     rect = Rect.new(0, 0, 26 * STATE[:size], 24)
  297.     contents.blt(STATE[:x], STATE[:y], @states, rect) if @states
  298.   end
  299.   #--------------------------------------------------------------------------
  300.   # ● フレーム更新
  301.   #--------------------------------------------------------------------------
  302.   def update
  303.     super
  304.     update_sui_character
  305.     update_sui_state if @first_delay < 0
  306.     @first_delay -= 1
  307.     if @duration > 0
  308.       @org_oy -= @speed
  309.       @org_oy = 0 if @org_oy < 0
  310.       @duration -= 1
  311.     end
  312.     self.y = Graphics.height - self.height + @org_oy
  313.   end
  314.   #--------------------------------------------------------------------------
  315.   # ○ 歩行グラフィックの更新
  316.   #--------------------------------------------------------------------------
  317.   def update_sui_character
  318.     return unless @character_name
  319.     @walk_duration = (@walk_duration + 1) % WALK[:speed]
  320.     @pattern = (@pattern + 1) % 4 if @walk_duration == 0
  321.     draw_character(WALK[:x], WALK[:y])
  322.   end
  323.   #--------------------------------------------------------------------------
  324.   # ○ 歩行グラフィックの描画
  325.   #--------------------------------------------------------------------------
  326.   def draw_character(x, y)
  327.     return unless @character_name
  328.     bitmap = Cache.character(@character_name)
  329.     sign = @character_name[/^[\!\$]./]
  330.     if sign && sign.include?(')
  331.       cw = bitmap.width / 3
  332.       ch = bitmap.height / 4
  333.     else
  334.       cw = bitmap.width / 12
  335.       ch = bitmap.height / 8
  336.     end
  337.     n = @character_index
  338.     pattern = @pattern < 3 ? @pattern : 1
  339.     src_rect = Rect.new((n%4*3+pattern)*cw, (n/4*4)*ch, cw, ch)
  340.     contents.clear_rect(x - cw / 2, y - ch, cw, ch)
  341.     contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  342.   end
  343.   #--------------------------------------------------------------------------
  344.   # ○  ステートの更新
  345.   #--------------------------------------------------------------------------
  346.   def update_sui_state
  347.     return if @state_size == 0
  348.     return if @state_size <= STATE[:size]
  349.     @state_duration += 1
  350.     if @state_duration < STATE[:speed]
  351.       contents.clear_rect(STATE[:x], STATE[:y], 26 * STATE[:size], 24)
  352.       @offset_x += @move_speed
  353.       tx = 26 * STATE[:size]
  354.       sx = 26 * @state_index + @offset_x.to_int
  355.       sw = [tx, @states.width - sx].min
  356.       rect = Rect.new(sx, 0, sw, 24)
  357.       contents.blt(STATE[:x], STATE[:y], @states, rect)
  358.       if tx > sw
  359.         rect = Rect.new(0, 0, tx - sw, 24)
  360.         contents.blt(STATE[:x] + sw, STATE[:y], @states, rect)
  361.       end
  362.     end
  363.     if @state_duration >= STATE[:speed] + STATE[:duration]
  364.       @state_duration = 0
  365.       @offset_x = 0.0
  366.       @state_index = (@state_index + 1) % @state_size
  367.     end
  368.   end
  369. end


  370. class Window_SuiMenuStatus < Window_MenuStatus
  371.   #--------------------------------------------------------------------------
  372.   # ● オブジェクト初期化
  373.   #--------------------------------------------------------------------------
  374.   def initialize
  375.     create_actors_status
  376.     super(0, Graphics.height - window_height + standard_padding)
  377.     self.opacity = 0
  378.     refresh
  379.   end
  380.   #--------------------------------------------------------------------------
  381.   # ● フレーム更新
  382.   #--------------------------------------------------------------------------
  383.   def update
  384.     super
  385.     @actors_window.each {|window| window.update }
  386.   end
  387.   #--------------------------------------------------------------------------
  388.   # ● 解放
  389.   #--------------------------------------------------------------------------
  390.   def dispose
  391.     @actors_window.each {|window| window.dispose }
  392.     super
  393.   end
  394.   #--------------------------------------------------------------------------
  395.   # ● ウィンドウが関連付けられているビューポート
  396.   #--------------------------------------------------------------------------
  397.   def viewport=(viewport)
  398.     super
  399.     @actors_window.each {|window| window.viewport = viewport }
  400.   end
  401.   #--------------------------------------------------------------------------
  402.   # ● ウィンドウの可視状態
  403.   #--------------------------------------------------------------------------
  404.   def visible=(flg)
  405.     super
  406.     @actors_window.each {|window| window.visible = flg}
  407.   end
  408.   #--------------------------------------------------------------------------
  409.   # ● ウィンドウ幅の取得
  410.   #--------------------------------------------------------------------------
  411.   def window_width
  412.     (Graphics.width / 4) * $game_party.members.size
  413.   end
  414.   #--------------------------------------------------------------------------
  415.   # ● ウィンドウ高さの取得
  416.   #--------------------------------------------------------------------------
  417.   def window_height
  418.     Window_SuiActorStatus::HEIGHT + standard_padding
  419.   end
  420.   #--------------------------------------------------------------------------
  421.   # ● 項目を描画する矩形の取得
  422.   #--------------------------------------------------------------------------
  423.   def item_rect(index)
  424.     window = @actors_window[index]
  425.     rect = Rect.new
  426.     rect.y = -standard_padding
  427.     rect.x = window.x + window.width / 2 - standard_padding
  428.     rect
  429.   end
  430.   #--------------------------------------------------------------------------
  431.   # ● 項目の高さを取得
  432.   #--------------------------------------------------------------------------
  433.   def item_height
  434.     1
  435.   end
  436.   #--------------------------------------------------------------------------
  437.   # ● 項目の選択
  438.   #--------------------------------------------------------------------------
  439.   def select(index)
  440.     @actors_window[self.index].select(false) if @actors_window[self.index]
  441.     super
  442.     @actors_window[self.index].select(true)  if @actors_window[self.index]
  443.     if self.viewport
  444.       if index < 4
  445.         self.viewport.ox = 0
  446.       else
  447.         self.viewport.ox = (Graphics.width / 4) * (index - 3)
  448.       end
  449.     end
  450.     call_handler(:change)
  451.   end
  452.   #--------------------------------------------------------------------------
  453.   # ● 項目の選択解除
  454.   #--------------------------------------------------------------------------
  455.   def unselect
  456.     @actors_window[self.index].select(false) if @actors_window[self.index]
  457.     super
  458.   end
  459.   #--------------------------------------------------------------------------
  460.   # ○ アクター個々のウィンドウを作成
  461.   #--------------------------------------------------------------------------
  462.   def create_actors_status
  463.     @actors_window = []
  464.     Window_SuiActorStatus.reset
  465.     $game_party.members.each_with_index do |actor, index|
  466.       window = Window_SuiActorStatus.new
  467.       window.x = window.width * index
  468.       window.refresh(actor)
  469.       @actors_window[index] = window
  470.     end
  471.   end
  472.   #--------------------------------------------------------------------------
  473.   # ● 項目の描画
  474.   #--------------------------------------------------------------------------
  475.   def draw_item(index)
  476.     actor = $game_party.members[index]
  477.     @actors_window[index].refresh(actor)
  478.   end
  479.   #--------------------------------------------------------------------------
  480.   # ● カーソルを右に移動
  481.   #--------------------------------------------------------------------------
  482.   def cursor_right(wrap = false)
  483.     cursor_down(wrap)
  484.   end
  485.   #--------------------------------------------------------------------------
  486.   # ● カーソルを左に移動
  487.   #--------------------------------------------------------------------------
  488.   def cursor_left(wrap = false)
  489.     cursor_up(wrap)
  490.   end
  491. end



  492. class Window_SuiMenuMap < Window_Base
  493.   #--------------------------------------------------------------------------
  494.   # ● オブジェクト初期化
  495.   #--------------------------------------------------------------------------
  496.   def initialize
  497.     super(0, 0, window_width, fitting_height(1))
  498.     refresh
  499.   end
  500.   #--------------------------------------------------------------------------
  501.   # ● ウィンドウ幅の取得
  502.   #--------------------------------------------------------------------------
  503.   def window_width
  504.     return 160
  505.   end
  506.   #--------------------------------------------------------------------------
  507.   # ○ スライドの設定
  508.   #--------------------------------------------------------------------------
  509.   def slide_setup
  510.     @slide = true
  511.     @org_x = self.x
  512.     @duration = 10
  513.     @org_ox = self.width.to_f
  514.     @speed = @org_ox / @duration
  515.     self.x += @org_ox
  516.   end
  517.   #--------------------------------------------------------------------------
  518.   # ● フレーム更新
  519.   #--------------------------------------------------------------------------
  520.   def update
  521.     super
  522.     return unless @slide
  523.     if @duration > 0
  524.       @org_ox -= @speed
  525.       @org_ox = 0 if @org_ox < 0
  526.       @duration -= 1
  527.     end
  528.     @slide = false if @duration <= 0
  529.     self.x = @org_x + @org_ox
  530.   end
  531.   #--------------------------------------------------------------------------
  532.   # ● リフレッシュ
  533.   #--------------------------------------------------------------------------
  534.   def refresh
  535.     contents.clear
  536.     draw_text_ex(4, 0, map_name)
  537.   end
  538.   #--------------------------------------------------------------------------
  539.   # ○ マップ名
  540.   #--------------------------------------------------------------------------
  541.   def map_name
  542.     $data_mapinfos[$game_map.map_id].name
  543.   end
  544. end


  545. class Window_Gold < Window_Base
  546.   #--------------------------------------------------------------------------
  547.   # ○ スライドの設定
  548.   #--------------------------------------------------------------------------
  549.   def slide_setup
  550.     @slide = true
  551.     @org_x = self.x
  552.     @duration = 12
  553.     @org_ox = self.width + self.width / 5.0
  554.     @speed = @org_ox / @duration
  555.     self.x += @org_ox
  556.   end
  557.   #--------------------------------------------------------------------------
  558.   # ● フレーム更新
  559.   #--------------------------------------------------------------------------
  560.   def update
  561.     super
  562.     return unless @slide
  563.     if @duration > 0
  564.       @org_ox -= @speed
  565.       @org_ox = 0 if @org_ox < 0
  566.       @duration -= 1
  567.     end
  568.     @slide = false if @duration <= 0
  569.     self.x = @org_x + @org_ox
  570.   end
  571. end


  572. class Window_VariablesView < Window_Selectable
  573.   #--------------------------------------------------------------------------
  574.   # ○ スライドの設定
  575.   #--------------------------------------------------------------------------
  576.   def slide_setup
  577.     @slide = true
  578.     @org_x = self.x
  579.     @duration = 14
  580.     @org_ox = self.width + (self.width / 5.0) * 2
  581.     @speed = @org_ox / @duration
  582.     self.x += @org_ox
  583.   end
  584.   #--------------------------------------------------------------------------
  585.   # ● フレーム更新
  586.   #--------------------------------------------------------------------------
  587.   def update
  588.     super
  589.     return unless @slide
  590.     if @duration > 0
  591.       @org_ox -= @speed
  592.       @org_ox = 0 if @org_ox < 0
  593.       @duration -= 1
  594.     end
  595.     @slide = false if @duration <= 0
  596.     self.x = @org_x + @org_ox
  597.   end
  598. end

  599. class Scene_Menu < Scene_MenuBase
  600.   #--------------------------------------------------------------------------
  601.   # ● 開始処理
  602.   #--------------------------------------------------------------------------
  603.   alias sui_layout_menu_start start
  604.   def start
  605.     sui_layout_menu_start
  606.     create_map_window
  607.     layout_position
  608.   end
  609.   #--------------------------------------------------------------------------
  610.   # ● ビューポートの解放
  611.   #--------------------------------------------------------------------------
  612.   alias sui_layout_dispose_main_viewport dispose_main_viewport
  613.   def dispose_main_viewport
  614.     sui_layout_dispose_main_viewport
  615.     @status_viewport.dispose
  616.   end
  617.   #--------------------------------------------------------------------------
  618.   # ● マップ名ウィンドウの作成
  619.   #--------------------------------------------------------------------------
  620.   def create_map_window
  621.     @map_window = Window_SuiMenuMap.new
  622.     @map_window.x = Graphics.width - @gold_window.width
  623.   end
  624.   #--------------------------------------------------------------------------
  625.   # ● ステータスウィンドウの作成  ※再定義
  626.   #--------------------------------------------------------------------------
  627.   def create_status_window
  628.     @status_viewport = Viewport.new
  629.     @status_viewport.z = 500
  630.     @status_window = Window_SuiMenuStatus.new
  631.     @status_window.viewport = @status_viewport
  632.     @status_window.set_handler(:change, method(:change_spc))
  633.   end
  634.   #--------------------------------------------------------------------------
  635.   # ● フレーム更新
  636.   #--------------------------------------------------------------------------
  637.   alias sui_layout_update update
  638.   def update
  639.     @status_viewport.update
  640.     if Input.press?(SUI::MENU_LAYOUT::BUTTON)
  641.       @gold_window.visible = false
  642.       @map_window.visible = false
  643.       @status_window.visible = false
  644.       @command_window.visible = false
  645.       @variables_window.visible = false
  646.       Window_Base.hide_cursor_animation
  647.       Graphics.update
  648.       Input.update
  649.     else
  650.       @gold_window.visible = true
  651.       @map_window.visible = true
  652.       @status_window.visible = true
  653.       @command_window.visible = true
  654.       @variables_window.visible = true
  655.       Window_Base.show_cursor_animation
  656.       sui_layout_update
  657.     end
  658.   end
  659.   #--------------------------------------------------------------------------
  660.   # ○ 立ち絵変更
  661.   #--------------------------------------------------------------------------
  662.   def change_spc
  663.     menu = $game_party.members[@status_window.index].id
  664.     if $m[menu]
  665.       @spc.target     = $m[menu]
  666.       $m[menu].x      = SUI::STANDING_PICTURE::MENU_POS[menu][0]
  667.       $m[menu].y      = SUI::STANDING_PICTURE::MENU_POS[menu][1]
  668.       $m[menu].z      = SUI::STANDING_PICTURE::MENU_POS[menu][2]
  669.       $m[menu].zoom_x = SUI::STANDING_PICTURE::MENU_POS[menu][3]
  670.       $m[menu].zoom_y = SUI::STANDING_PICTURE::MENU_POS[menu][4]
  671.       $m[menu].show
  672.     else
  673.       @spc.target.hide
  674.     end
  675.   end
  676.   #--------------------------------------------------------------------------
  677.   # ○ 位置補正
  678.   #--------------------------------------------------------------------------
  679.   def layout_position
  680.     @gold_window.x = @map_window.x
  681.     @gold_window.y = @map_window.y + @map_window.height
  682.     if @variables_window
  683.       @variables_window.x = @map_window.x
  684.       @variables_window.y = @gold_window.y + @gold_window.height
  685.     end
  686.     @map_window.slide_setup
  687.     @gold_window.slide_setup
  688.     @variables_window.slide_setup
  689.   end
  690. end
复制代码
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

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

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

GMT+8, 2024-9-23 23:30

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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