赞 | 0 |
VIP | 157 |
好人卡 | 6 |
积分 | 1 |
经验 | 113829 |
最后登录 | 2014-1-16 |
在线时间 | 26 小时 |
Lv1.梦旅人 B
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 26 小时
- 注册时间
- 2007-8-26
- 帖子
- 3693
|
不是很美观的说
- #==============================================================================
- # ■ Window_Target
- #------------------------------------------------------------------------------
- # 物品画面与特技画面的、使用对像角色选择窗口。
- #==============================================================================
- class Window_Target < Window_Selectable
- #--------------------------------------------------------------------------
- # ● 初始化对像
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 640, 480)
- self.contents = Bitmap.new(width - 32, height - 32)
- self.z += 10
- self.back_opacity = 160
- @column_max = 2
- @item_max = $game_party.actors.size
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- for i in 0...$game_party.actors.size
- x = 4 + i % 2 * (288 + 32)
- y = i / 2 * 120
- actor = $game_party.actors[i]
- draw_actor_name(actor, x, y)
- draw_actor_class(actor, x + 144, y)
- draw_actor_level(actor, x + 8, y + 32)
- draw_actor_state(actor, x + 8, y + 64)
- draw_actor_hp(actor, x + 152, y + 32)
- draw_actor_sp(actor, x + 152, y + 64)
- end
- end
- #--------------------------------------------------------------------------
- # ● 刷新光标矩形
- #--------------------------------------------------------------------------
- def update_cursor_rect
- # 光标位置 -1 为全选、-2 以下为单独选择 (使用者自身)
- if @index <= -2
- self.cursor_rect.set(0, i / 2 * 120, 320, 96)
- elsif @index == -1
- self.cursor_rect.set(0, 0, self.width - 32, @item_max * 58)
- else
- self.cursor_rect.set(4 + @index % 2 * (288 + 32), @index / 2 * 120, 320, 96)
- end
- end
- end
复制代码
同时全局搜索
@target_window.x = (@item_window.index + 1) % 2 * 304
改为
@target_window.x = 0 系统信息:本贴由楼主认可为正确答案,66RPG感谢您的热情解答~ |
|