Skip to content

Instantly share code, notes, and snippets.

@RolandWarburton
Created May 16, 2019 23:52
Show Gist options
  • Save RolandWarburton/141bcfd318ff4fc4f716facb4d491645 to your computer and use it in GitHub Desktop.
Save RolandWarburton/141bcfd318ff4fc4f716facb4d491645 to your computer and use it in GitHub Desktop.
how to draw text in gosu
require 'gosu'
class GosuWindow < Gosu::Window
def initialize
super 640, 480, false
self.caption = "gosu"
@font = Gosu::Font.new(self, Gosu::default_font_name, 20)
end
def draw
@font.draw("Hello World!", 0, 0, 1, 1.0, 1.0, Gosu::Color::WHITE)
end
end
window = GosuWindow.new
window.show
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment