Project1
标题:
怎么让战斗信息框透明
[打印本页]
作者:
冰舞蝶恋
时间:
2010-9-23 20:20
标题:
怎么让战斗信息框透明
还有角色状态框也要透明,但文字的透明度还是照常。
另外,vx有没有图片战斗指令选框的脚本?
谢谢了。
作者:
ganty
时间:
2010-9-23 21:47
呃...只能為標題的問題提個方法..
嗯..這腳本是把戰鬥訊息放在左上角+半透明化的...
希望能幫上忙..
#==============================================================================
# ★RGSS2
# STR11b_XP風バトル#バトルメッセージ v1.2 08/01/26
# サポート:http://otsu.cool.ne.jp/strcatyou/
# ・バトルメッセージを透明化して、左上に移動します。
#
#------------------------------------------------------------------------------
#
# 更新履歴
# ◇1.2→1.3
# 通常のウィンドウ表示に対応 (ウィンドウを透明化しないオプション)
# ◇1.1→1.2
# STR11fへの対応に伴い仕様変更
# 設定箇所追加(メッセージ幅)
# ◇1.0→1.1
# 選択肢がおかしいバグ修正
#
#==============================================================================
# ■ Window_BattleMessage
#==============================================================================
class Window_BattleMessage < Window_Message
# Color de Fondo (degradado) [izquierda, derecha]
TEXT_B_COLOR = [Color.new(0,0,0,160), Color.new(0,0,0,0)]
INFO = "訊息" # Mensagem do quadro de mensagens
BTWIDTH = 360 # Altura
MOVE = true
SPEED = 2
W_OPACITY = 96
N_WINDOW = false #--------------------------------------------------------------------------
# ★ エイリアス
#--------------------------------------------------------------------------
alias initialize_str11b initialize
def initialize
initialize_str11b
self.x = 0
self.y = 0
self.back_opacity = 0
self.opacity = 0
unless N_WINDOW
@b_sprite = Sprite.new(self.viewport)
bitmap = Bitmap.new(BTWIDTH, 96 + 16)
bitmap.gradient_fill_rect(0, 16, BTWIDTH, 96, TEXT_B_COLOR[0], TEXT_B_COLOR[1])
bitmap.font.shadow = false
bitmap.font.size = 16
bitmap.draw_text(2, 2, BTWIDTH, 16, INFO)
@b_sprite.bitmap = bitmap
@b_sprite.x = self.x
@b_sprite.y = self.y
@b_sprite.src_rect.height = 16
@b_sprite.opacity = 0
@str11f = false
end
end
alias dispose_str11b dispose
def dispose
dispose_str11b
unless N_WINDOW
@b_sprite.bitmap.dispose
@b_sprite.dispose
end
end
alias update_str11b update
def update
update_str11b
unless N_WINDOW
if self.visible and (@lines.size > 0 and not @str11f) or
(@text != nil or self.pause or @index > -1)
@b_sprite.opacity += W_OPACITY
h = @b_sprite.src_rect.height
if @text != nil
@l = 4
else
unless self.pause or @index > -1
@l = @lines.size
else
@l = 4
end
end
if MOVE
if SPEED == 1
@b_sprite.src_rect.height = 16 + (@l * 24)
else
s = (SPEED - 1)
@b_sprite.src_rect.height = (h + ((16 + (@l * 24)) * s)) / SPEED
end
else
@b_sprite.src_rect.height = 96 + 16
end
else
@b_sprite.opacity -= W_OPACITY
end
else
if self.visible
self.back_opacity += W_OPACITY
self.opacity += W_OPACITY
self.back_opacity = 200 if self.back_opacity > 200
else
self.back_opacity -= W_OPACITY
self.opacity -= W_OPACITY
end
end
end
end
复制代码
2010-09-23_214426.png
(102.63 KB, 下载次数: 8)
下载附件
保存到相册
2010-9-23 21:44 上传
作者:
冰舞蝶恋
时间:
2010-9-23 22:38
回复
ganty
的帖子
额……谢谢啊。不过另外两个问题强烈求解!
作者:
冰舞蝶恋
时间:
2010-9-24 15:17
……没人回答吗……自顶求解
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1