Project1

标题: [已解决]如何把窗口蓝色的部分透明度=0只留头像和血条 [打印本页]

作者: 金芒芒    时间: 2023-3-9 09:25
标题: [已解决]如何把窗口蓝色的部分透明度=0只留头像和血条
本帖最后由 金芒芒 于 2023-3-9 13:56 编辑

[pre lang="ruby"]class Window_kg_status < Window_Base
  
  def initialize(actor_id, window_index)
    super(560 - window_index * 76 , 540, 117, 150)
    @actor_id = actor_id
    self.contents = Bitmap.new(width - 1, height- 1 )
    refresh
  end
  
  def dispose
    super
  end
  
  def refresh
    self.contents.clear
    #draw_actor_name($game_actors[@actor_id], 0, 0)
    draw_actor_picture($game_actors[@actor_id].battler_name, $game_actors[@actor_id].battler_hue, -1 ,-1)
    draw_actor_hp($game_actors[@actor_id], 50, 25)
    draw_actor_sp($game_actors[@actor_id], 50, 50)
    draw_actor_cp($game_actors[@actor_id], 50, 80)
  end
  
end[/pre]
作者: 契约师Vi    时间: 2023-3-9 09:29
self.back_opacity
作者: 金芒芒    时间: 2023-3-9 09:50
本帖最后由 金芒芒 于 2023-3-9 10:12 编辑
契约师Vi 发表于 2023-3-9 09:29
self.back_opacity


我不会脚本你可以帮忙添加的到哪一行吗,边框这么没去掉
[pre lang="ruby"]class Window_kg_status < Window_Base
  
  def initialize(actor_id, window_index)
    super(560 - window_index * 76 , 540, 117, 150)
    @actor_id = actor_id
    self.contents = Bitmap.new(width - 1, height- 1 )
    self.opacity = 0
    refresh
  end
  
  def dispose
    super
  end[/pre]
作者: soulsaga    时间: 2023-3-9 10:43
self.contents = Bitmap.new(width - 1, height- 1 )
不要-1?
那大概就是边框..
作者: 金芒芒    时间: 2023-3-9 11:01
soulsaga 发表于 2023-3-9 10:43
self.contents = Bitmap.new(width - 1, height- 1 )
不要-1?
那大概就是边框..

self.opacity=0 已经可以了




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X5.0