Sha256: 77af2a67e6a1020f01db681848d7ce37ced5231eae8eb5abe1016e406d614a2d

Contents?: true

Size: 618 Bytes

Versions: 6

Compression:

Stored size: 618 Bytes

Contents

# Ruby2D::DSL

module Ruby2D::DSL

  @window = Ruby2D::Window.new

  def self.window; @window end
  def self.window=(w); @window = w end

  def get(sym, opts = nil)
    DSL.window.get(sym, opts)
  end

  def set(opts)
    DSL.window.set(opts)
  end

  def on(event, &proc)
    DSL.window.on(event, &proc)
  end

  def off(event_descriptor)
    DSL.window.off(event_descriptor)
  end

  def update(&proc)
    DSL.window.update(&proc)
  end

  def render(&proc)
    DSL.window.render(&proc)
  end

  def clear
    DSL.window.clear
  end

  def show
    DSL.window.show
  end

  def close
    DSL.window.close
  end

end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
ruby2d-0.11.3 lib/ruby2d/dsl.rb
ruby2d-0.11.2 lib/ruby2d/dsl.rb
ruby2d-rpeck-windows-0.11.1 lib/ruby2d/dsl.rb
ruby2d-0.11.1 lib/ruby2d/dsl.rb
ruby2d-0.11.0 lib/ruby2d/dsl.rb
ruby2d-0.10.0 lib/ruby2d/dsl.rb