Sha256: fa33509381997439508c9d9c4a666cfff30899370fb1468d362feabe309616a5

Contents?: true

Size: 662 Bytes

Versions: 1

Compression:

Stored size: 662 Bytes

Contents

begin
  require 'rubygems'
rescue LoadError
end

require "gosu"
require "../gglib"
require "../ext/widgets"
require "../ext/themes"

class ConsoleDemoWindow < GGLib::GUIWindow
  def initialize
    super(640, 480, false, 20)
    self.caption = "GGLib Console Demo"
    self.state = ConsoleDemoState.new
  end
end

class ConsoleDemoState < GGLib::StateObject
  def onStart
    $window.setBackground("img/bg.png")
    GGLib::Button.new(:button1, "Open Console", 270, 200, Proc.new{ |widget| GGLib::DebugConsole.new; GGLib::Label.new(:label1, "Enter /help for help.", 250, 300, GGLib::Themes::Shade) }, GGLib::Themes::BlueSteel)
  end
end

ConsoleDemoWindow.new.show

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
gglib-1.3.0 examples/ConsoleDemo.rb