Sha256: 8580f9616431e03e2ca968f346b8f231e8a2ddb79e74e27bc1bc1c328f57562d
Contents?: true
Size: 817 Bytes
Versions: 2
Compression:
Stored size: 817 Bytes
Contents
module GGLib class SplashScreen < Gosu::Window def initialize(width=640, height=480, img = "null.png", caption = "Loading...") super(width, height, false, 20) self.caption = caption @background_image = Gosu::Image.new(self, img, true) @done=false end #Override this method and include all initialization methods here *except for opening the window*. def load end #Override with method with the code needed to initialize the main application window. def createWindow end def update load @done=true if @done puts "\nLaunching in:\n3" sleep(1) puts "2" sleep(1) puts "1" sleep(1) puts "0" close createWindow end end def draw @background_image.draw(0, 0, 0) end end end #module GGLib
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gglib-1.2.1 | lib/ext/splash.rb |
gglib-1.3.0 | lib/ext/splash.rb |