赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 6915 |
最后登录 | 2024-4-7 |
在线时间 | 99 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 129
- 在线时间
- 99 小时
- 注册时间
- 2012-11-7
- 帖子
- 36
|
3楼
楼主 |
发表于 2015-4-6 16:18:37
|
只看该作者
成功改成可以選直式的了,謝謝!
不過不知道改到什麼,明明隊伍有4個人,畫面上卻變成只顯示第一個隊員@@
(其他人還是可以選擇,只是名字啊血量啊什麼的都空白)
是因為把臉圖改成行走圖少了enabled這個參數嗎?(看不懂@@)- #==============================================================================
- # ■ Window_MenuStatus
- #------------------------------------------------------------------------------
- # 菜單畫面中,顯示隊伍成員狀態的窗口
- #==============================================================================
- class Window_MenuStatus < Window_Selectable
- #--------------------------------------------------------------------------
- # ● 定義實例變量
- #--------------------------------------------------------------------------
- attr_reader :pending_index # 保留位置(整隊用)
- #--------------------------------------------------------------------------
- # ● 初始化對象
- #--------------------------------------------------------------------------
- def initialize(x, y)
- super(x, y,window_width, window_height)
- @pending_index = -1
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 獲取窗口的寬度
- #--------------------------------------------------------------------------
- def window_width
- Graphics.width-600
- end
- #--------------------------------------------------------------------------
- # ● 獲取窗口的高度
- #--------------------------------------------------------------------------
- def window_height
- Graphics.height-56
- end
-
- #--------------------------------------------------------------------------
- # ● 计算窗口内容的宽度
- #--------------------------------------------------------------------------
- def contents_width
- #~ (item_width + spacing) * item_max - spacin
- item_width
- end
- #--------------------------------------------------------------------------
- # ● 计算窗口内容的宽度
- #--------------------------------------------------------------------------
- def contents_height
- item_height
- #~ (item_height + spacing) * item_max - spacin
- end
- #--------------------------------------------------------------------------
- # ● 获取列数
- #--------------------------------------------------------------------------
- def rol_max
- return 4 #跟据分辨率的不同可以改
- end
- #--------------------------------------------------------------------------
- # ● 获取项目数
- #--------------------------------------------------------------------------
- def item_max
- $game_party.members.size
- end
- #--------------------------------------------------------------------------
- # ● 获取项目的高度
- #--------------------------------------------------------------------------
- def item_height
- #~ height - standard_padding * 2
- (height - standard_padding * 2 + spacing) /rol_max - spacing
- end
- #--------------------------------------------------------------------------
- # ● 获取项目的宽度
- #--------------------------------------------------------------------------
- def item_width
- #~ (width - standard_padding * 2 + spacing) /col_max - spacing
- width - standard_padding * 2
- end
- #--------------------------------------------------------------------------
- # ● 获取行间距的宽度
- #--------------------------------------------------------------------------
- def spacing
- return 0
- end
- #--------------------------------------------------------------------------
- # ● 绘制项目
- #--------------------------------------------------------------------------
- def draw_item(index)
- actor = $game_party.members[index]
- enabled = $game_party.battle_members.include?(actor)
- rect = item_rect(index)
- draw_item_background(index)
- #~ draw_actor_face(actor, rect.x, rect.y, enabled)
- draw_actor_graphic(actor, rect.x+20, rect.y-24)#行走圖
- draw_actor_name(actor,rect.x, rect.y)
- draw_actor_class(actor,rect.x+120, rect.y)#職業改成靠右
- draw_actor_icons(actor,rect.x,rect.y+line_height*1)#狀態圖
- draw_actor_hp(actor,rect.x+48, rect.y+line_height*2)
- draw_actor_mp(actor,rect.x+48,rect.y+line_height*3)
- draw_actor_tp(actor,rect.x+48,rect.y+line_height*4)
- draw_actor_level(actor,rect.x, rect.y+line_height*5)#加上經驗條 EXP?
- end
- #--------------------------------------------------------------------------
- # ● 繪制項目的背景
- #--------------------------------------------------------------------------
- def draw_item_background(index)
- if index == @pending_index
- contents.fill_rect(item_rect(index), pending_color)
- end
- end
- #--------------------------------------------------------------------------
- # ● 按下確定鍵時的處理
- #--------------------------------------------------------------------------
- def process_ok
- super
- $game_party.menu_actor = $game_party.members[index]
- end
- #--------------------------------------------------------------------------
- # ● 返回上一個選擇的位置
- #--------------------------------------------------------------------------
- def select_last
- select($game_party.menu_actor.index || 0)
- end
- #--------------------------------------------------------------------------
- # ● 設置保留位置(整隊用)
- #--------------------------------------------------------------------------
- def pending_index=(index)
- last_pending_index = @pending_index
- @pending_index = index
- redraw_item(@pending_index)
- redraw_item(last_pending_index)
- end
- end
复制代码 ps.我不確定問A改A成功後出現B問題該發新帖還是要連帖繼續問??@@
|
|