Skip to content

Instantly share code, notes, and snippets.

@zyan0
Created Dec 1, 2012
Embed
What would you like to do?
Hello,world! for RPG Maker XP
class Window_Hello < Window_Base
def initialize
super(380 , 20, 220, 60)
self.contents = Bitmap.new(width - 32, height - 32)
@time = 0
end
def update
if @time == 0
self.contents.clear
self.contents.draw_text(4, 0 , width - 40, 32, "Hello", 1)
elsif @time == 100
self.contents.clear
self.contents.draw_text(4, 0 , width - 40, 32, "World!", 1)
elsif @time == 200
@time = -1
end
@time = @time + 1
end
end
class Scene_Map
alias old_main main
def main
@hello = Window_Hello.new
old_main
@hello.dispose
end
alias old_update update
def update
@hello.update
old_update
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment