Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (14 sloc) 364 Bytes
require 'gosu'
class KeyboardExample < Gosu::Window
def initialize
super 640, 480
self.caption = "Keyboard Example"
@font = Gosu::Font.new(32, name: "Nimbus Mono L")
self.text_input = Gosu::TextInput.new
self.text_input.text = "Type something!"
end
def draw
@font.draw(self.text_input.text, 20, 40, 0)
end
end
window = KeyboardExample.new.show