# File examples/BasicExample.rb, line 43 def onStart puts "MyStateObj activated." #Since Gosu only allows one window instance at a time, the current #window is automatically sotred in the global $window. $window.setBackground("img/bgblue.png") #Whats a GUI Library without widgets? #A textbox: $textbox = GGLib::TextBox.new("textbox1", 220, 100, 12, GGLib::Themes::BlueSteel) #Some buttons: GGLib::Button.new(:button1, "Click Me", 270, 50, Proc.new{ |widget| $textbox.text = "Thank you" }, GGLib::Themes::BlueSteel) GGLib::Button.new(:button2, "Exit", 270, 200, Proc.new{ |widget| $window.close; exit }, GGLib::Themes::BlueSteel) end