Class: GBRb::Graphics::ScreenServer::Window
- Inherits:
-
Object
- Object
- GBRb::Graphics::ScreenServer::Window
- Defined in:
- lib/gbrb/graphics/screen_server.rb
Instance Method Summary collapse
-
#initialize(incoming) ⇒ Window
constructor
A new instance of Window.
Constructor Details
#initialize(incoming) ⇒ Window
Returns a new instance of Window.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/gbrb/graphics/screen_server.rb', line 53 def initialize incoming tkroot = TkRoot.new do title "GBRb" resizable false, false end display = Display.new tkroot Thread.new do loop do data = incoming.gets begin display.update_pixels data if data rescue RuntimeError => e next end end end tkroot.mainloop end |