Wiki
Version 1 (modified by pyros2097, 11 years ago)

created

This is a basic Splash Screen I created using Gtk

@args 2.0gtk-sharp-2.0

use System
use Gtk

class Splash inherits Window
    cue init
        base.init("")
        .defaultSize = Gdk.Size(300,200)
        .windowPosition = WindowPosition.Center
        .decorated = false
        .hasFocus = false
        .hasFrame = false
        .keepAbove = true
        .modal = false
        .skipPagerHint = true
        .skipTaskbarHint = true
        .typeHint = Gdk.WindowTypeHint.Splashscreen
        .add(Image("logo.png"))
        .showAll


class MainWindow inherits Window
    cue init
        base.init("My Main")
        #simulate something that times time like Thread.sleep(5)

    def main is shared has STAThread
        Application.init
        spl = Splash()
        while Application.eventsPending
        Application.runIteration
        MainWindow() #This is the window that takes a lot of time to load
        spl.destroy
        Application.run