Created
May 16, 2019 23:52
-
-
Save RolandWarburton/141bcfd318ff4fc4f716facb4d491645 to your computer and use it in GitHub Desktop.
how to draw text in gosu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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