Skip to content

Instantly share code, notes, and snippets.

@zyan0
Created December 1, 2012 02:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zyan0/4180247 to your computer and use it in GitHub Desktop.
Save zyan0/4180247 to your computer and use it in GitHub Desktop.
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