Sha256: 6b607f35ed53ae359563381f83701e48fd090f8a6f5f61f8d2a69784c7872866

Contents?: true

Size: 767 Bytes

Versions: 2

Compression:

Stored size: 767 Bytes

Contents

module Joybox
  module Configuration

    module_function

    def setup(&block)
      instance_eval(&block) if block_given?
      configure

      Director.sharedDirector
    end

    def configure
      director unless @is_director_configured
      opengl_view unless @is_opengl_view_configured
      debug unless @is_debug_configured
    end

    def director(options = {})
      Director.configure(options)
      @is_director_configured = true
    end

    def opengl_view(options = {})
      opengl_view = GLView.new(options)
      director = Director.sharedDirector
      director.view = opengl_view
      @is_opengl_view_configured = true
    end

    def debug(options = {})
      Debug.configure(options)
      @is_debug_configured = true
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
joybox-1.1.1 motion/joybox-osx/configuration/configuration.rb
joybox-1.1.0 motion/joybox-osx/configuration/configuration.rb