赞 | 0 |
VIP | 0 |
好人卡 | 1 |
积分 | 1 |
经验 | 2567 |
最后登录 | 2013-10-3 |
在线时间 | 44 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 44 小时
- 注册时间
- 2013-5-25
- 帖子
- 91
|
- #==============================================================================
- # ★RGSS2
- # STR11b_XP風バトル#バトルメッセージ v1.2 08/01/26
- # サポート:htt#p:/#/ot#su.cool.ne.jp/strcatyou/ ←6R提示我没法发链接。请把链接中#符去掉以打开。
- # ・バトルメッセージを透明化して、左上に移動します。
- #
- #------------------------------------------------------------------------------
- #
- # 更新履歴
- # ◇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,0), Color.new(0,0,0,0)]
- INFO = "Battle Message" # 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
复制代码 用这个试试。 |
|