Skip to content

class Backend public

Runs a Hokusai::Block as a Game / Application Used by the C/MRuby/Raylb backend

Examples

ruby
Hokusai::Backend.run(BonziBuddy) do |config|
  config.title = "BonziBuddy reloaded"
  config.width = 500
  config.height = 500
  #
  # need to set at least one font if using text
  config.after_load do
    Hokusai.fonts.register "default", Hokusai::Backend::Font.default
    Hokusai.fonts.activate "default"
  end
end

.run(klass, &block) public

Run a hokusai-pocket app. Blocking until app is exited.

Arguments

  • klass - a Hokusai::Block.class
  • block - a callback to configure the application

#initialize(app, config) internal

constructor for Backend

Arguments

  • app - a Hokusai::Block.class
  • config - a Hokusai::Backend::Config