赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 13512 |
最后登录 | 2022-5-16 |
在线时间 | 140 小时 |
Lv1.梦旅人 茄孓
- 梦石
- 0
- 星屑
- 72
- 在线时间
- 140 小时
- 注册时间
- 2007-5-29
- 帖子
- 956
|
应该可以放下最大的图片了,只是位置关系
把脚本放到main前然后按以下笨拙方法进行
就ok了
- #==============================================================================
- #==============================================================================
- #==============================================================================
- #==============================================================================
- #使用方法:随便弄一张空白图 命名为“0”放到picture元件里
- #当然角色四张图也放到picture元件里
- #以及四张相对应的角色图片名字。
- $一号角色图片X坐标 = -30 + 20
- $一号角色图片Y坐标 = -15
- # 一号对应图片名字为 “1”
- $二号角色图片X坐标 = -30 + 20
- $二号角色图片Y坐标 = +115
- # 二号对应图片名字为 “2”
- $三号角色图片X坐标 = -30 + 20
- $三号角色图片Y坐标 = +245
- # 三号对应图片名字为 “3”
- $四号角色图片X坐标 = -30 + 20
- $四号角色图片Y坐标 = +375
- # 四号对应图片名字为 “4”
- #==============================================================================
- #==============================================================================
- #==============================================================================
- class Window_MenuStatus < Window_Selectable
- #--------------------------------------------------------------------------
- # ● 初始化目标
- #--------------------------------------------------------------------------
- def initialize
- super(0, 0, 160, 352)
- self.contents = Bitmap.new(width - 32, height - 32)
- refresh
- self.active = false
- self.index = -2
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- @item_max = $game_party.actors.size
- for i in 0...$game_party.actors.size
- x = 64
- y = i * 80
- actor = $game_party.actors[i]
- draw_actor_picture1
- draw_actor_picture2
- draw_actor_picture3
- draw_actor_picture4
- # 我全写成散的! =。=
- self.contents.font.color = normal_color
- self.contents.font.size = 20
- self.contents.draw_text(x - 30, y, 120, 32, actor.name)
- self.contents.font.color = system_color
- self.contents.draw_text(x - 55, y + 50, 32, 32, "Lv")
- self.contents.font.color = normal_color
- self.contents.draw_text(x - 40, y + 50, 24, 32, actor.level.to_s, 2)
- self.contents.font.size = 16
- self.contents.font.color = system_color
- self.contents.draw_text(x - 30, y + 17, 32, 32, $data_system.words.hp)
- self.contents.font.color = actor.hp == 0 ? knockout_color :
- actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
- self.contents.draw_text(x - 6, y + 17, 32, 32, actor.hp.to_s, 2)
- self.contents.font.color = normal_color
- self.contents.draw_text(x - 26 + 48, y + 17, 12, 32, "/", 1)
- self.contents.draw_text(x - 24 + 56, y + 17, 32, 32, actor.maxhp.to_s)
- self.contents.font.color = system_color
- self.contents.draw_text(x - 30, y + 34, 32, 32, $data_system.words.sp)
- self.contents.font.color = actor.sp == 0 ? knockout_color :
- actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
- self.contents.draw_text(x - 6, y + 34, 32, 32, actor.sp.to_s, 2)
- self.contents.font.color = normal_color
- self.contents.draw_text(x - 26 + 48, y + 34, 12, 32, "/", 1)
- self.contents.draw_text(x - 24 + 56, y + 34, 32, 32, actor.maxsp.to_s)
- end
- end
- #--------------------------------------------------------------------------
- # ● 刷新光标矩形
- #--------------------------------------------------------------------------
- def update_cursor_rect
- if @index <= -2
- self.cursor_rect.empty
- elsif @index == -1
- self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)
- else
- self.cursor_rect.set(0, @index * 80, self.width - 32, 80)
- end
- end
-
- #--------------------------------------------------------------------------
- # ● 图形的描绘
- # actor : 角色 1 号
- #--------------------------------------------------------------------------
- def draw_actor_picture1
- if $game_party.actors.include?($game_actors[1])
- bitmap = RPG::Cache.picture("1")
- else
- bitmap = RPG::Cache.picture("0")
- end
- src_rect = Rect.new(0, 0, 640, 480)
- self.contents.blt($一号角色图片X坐标, $一号角色图片Y坐标, bitmap, src_rect)
- end
-
- #--------------------------------------------------------------------------
- # ● 图形的描绘
- # actor : 角色 2 号
- #--------------------------------------------------------------------------
- def draw_actor_picture2
- if $game_party.actors.include?($game_actors[2])
- bitmap = RPG::Cache.picture("2")
- else
- bitmap = RPG::Cache.picture("0")
- end
- src_rect = Rect.new(0, 0, 640, 480)
- self.contents.blt($二号角色图片X坐标, $二号角色图片Y坐标, bitmap, src_rect)
- end
-
- #--------------------------------------------------------------------------
- # ● 图形的描绘
- # actor : 角色 3 号
- #--------------------------------------------------------------------------
- def draw_actor_picture3
- if $game_party.actors.include?($game_actors[3])
- bitmap = RPG::Cache.picture("3")
- else
- bitmap = RPG::Cache.picture("0")
- end
- src_rect = Rect.new(0, 0, 640, 480)
- self.contents.blt($三号角色图片X坐标, $三号角色图片Y坐标, bitmap, src_rect)
- end
-
- #--------------------------------------------------------------------------
- # ● 图形的描绘
- # actor : 角色 4 号
- #--------------------------------------------------------------------------
- def draw_actor_picture4
- if $game_party.actors.include?($game_actors[4])
- bitmap = RPG::Cache.picture("4")
- else
- bitmap = RPG::Cache.picture("0")
- end
- src_rect = Rect.new(0, 0, 640, 480)
- self.contents.blt($四号角色图片X坐标, $四号角色图片Y坐标, bitmap, src_rect)
- end
-
- end
复制代码
|
|