Sha256: 0fc8f729b4538d8822730016ab90ed3990f6fb84a2d97eab036d76b0249af548
Contents?: true
Size: 868 Bytes
Versions: 1
Compression:
Stored size: 868 Bytes
Contents
begin require 'rubygems' rescue LoadError end require "gosu" require "../gglib" require "../ext/widgets" require "../ext/themes" class TracePanelDemoWindow < GGLib::GUIWindow def initialize super(640, 480, false, 20) self.caption = "GGLib Trace Panel Demo" self.state = TracePanelDemoState.new end end class TracePanelDemoState < GGLib::StateObject def onStart $window.setBackground("img/bg.png") $trace = GGLib::TracePanel.new GGLib::Button.new(:button1, "Open Trace", 270, 200, Proc.new{ |widget| $trace.wakeUp }, GGLib::Themes::BlueSteel) GGLib::Button.new(:button2, "put", 270, 280, Proc.new{ |widget| $trace.put "trace data" }, GGLib::Themes::BlueSteel) GGLib::Button.new(:button2, "sput", 270, 315, Proc.new{ |widget| $trace.sput "silent trace data" }, GGLib::Themes::BlueSteel) end end TracePanelDemoWindow.new.show
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gglib-1.3.0 | examples/TracePanelDemo.rb |