Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Scene_Battle
- alias skill_win_start start
- def start(*args)
- skill_win_start(*args)
- @skill_note_window = Window_BattleSkillNote.new
- end
- alias blahblah_use_item
- def use_item
- item = @subject.current_action.item
- return unless item
- @skill_note_window.set_text(@subject.name + ": " + item.name)
- blahblah_use_item
- end
- end
- class Window_BattleSkillNote < Window_Base
- def initialize
- super(0,12,100,48)
- self.openness = 0
- end
- def set_text(text)
- activate
- self.width = text_size(text).width * 1.5 + 48
- self.x = (Graphics.width - self.width) / 2
- create_contents
- contents.clear
- draw_text(0,0,contents.width,24,text,1)
- open
- @timer = 60
- end
- def update
- super
- deactivate if close?
- return unless open?
- @timer -= 1 if @timer > 0
- close if @timer == 0
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement