查看: 2138|回复: 1

[已经解决] 请问,怎么样才能这个脸图不是半透明的?

[复制链接]
梦石
0
星屑
75
在线时间
231 小时
注册时间
2014-10-5
回帖
226
发表于 2014-11-12 23:22:54 | 显示全部楼层 |阅读模式

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

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

×
就是我在战斗状态栏自己加入了连图,可是怎么回事半透明的?请问怎么修改?

[pre lang="ruby" line="1"]#encoding:utf-8
#==============================================================================
# ■ Window_BattleStatus
#------------------------------------------------------------------------------
#  战斗画面中,显示“队伍成员状态”的窗口。
#==============================================================================

class Window_BattleStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # ● 初始化对象
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, window_width, window_height)
    refresh
    self.openness = 0
  end
  #--------------------------------------------------------------------------
  # ● 获取窗口的宽度
  #--------------------------------------------------------------------------
  def window_width
    Graphics.width - 128
  end
  #--------------------------------------------------------------------------
  # ● 获取窗口的高度
  #--------------------------------------------------------------------------
  def window_height
    fitting_height(4)
  end
  #--------------------------------------------------------------------------
  # ● 获取项目数
  #--------------------------------------------------------------------------
  def item_max
    $game_party.battle_members.size
  end
  #--------------------------------------------------------------------------
  # ● 刷新
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    draw_all_items
  end
  #--------------------------------------------------------------------------
  # ● 描绘项目
  #--------------------------------------------------------------------------
  def draw_item(index)
    rect = item_rect(index)
    rect.x += 4
    rect.width -= 8
    self.contents.clear_rect(rect)
    self.contents.font.color = normal_color
    actor = $game_party.members[index]
    draw_actor_face(actor, rect.x , rect.y-20 )
    draw_actor_name(actor, index * 100, rect.y + 2)
    #draw_actor_icons(actor, rect.x + 104, rect.y, rect.width - 104)
    draw_actor_icons(actor, index * 100 + 8, 36, 24)
    draw_crhp(rect.x-4,rect.y+64,actor.hp,actor.mhp,"")
    draw_crmp(rect.x-4,rect.y+76,actor.mp,actor.mmp,"")
    draw_actor_tp(actor, index * 100, 60, 72)
  end
  #----------------------------------------------------------------------
  # ● 设置光标的位置
  #     index : 新的光标位置
  #--------------------------------------------------------------------------
  def index=(index)
    @index = index
    update_cursor
    refresh
  end
  #--------------------------------------------------------------------------
  # ● 获取项目描画矩形
  #     index : 项目编号
  #--------------------------------------------------------------------------
  def item_rect(index)
    rect = Rect.new(0, 0, 0, 0)
    rect.width = contents.width - 113
    rect.height = 24
    rect.x = index * 100
    rect.y = 0
    return rect
  end  
  #--------------------------------------------------------------------------
  # ● 更新光标矩形
  #--------------------------------------------------------------------------
  def update_cursor   
    case @index
    when 0...4
      self.cursor_rect.set(@index * 100, 0, 100, 96)
    else
      self.cursor_rect.empty        # 光标无效
    end
  end
end
[/pre]
QQ截图20141112232143.png

…あたしは天

梦石
0
星屑
2308
在线时间
4033 小时
注册时间
2010-10-4
回帖
10548

开拓者贵宾

发表于 2014-11-13 12:35:24 | 显示全部楼层
检查一下有没有重定义过 draw_actor_face 和 draw_face,尤其是有关 enabled 参数的部分

点评

找到了,enabled被定义为假了,换证真就好了,谢谢了  发表于 2014-11-13 19:47

评分

参与人数 1梦石 +1 收起 理由
VIPArcher + 1 认可答案

查看全部评分

回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部