lib/pixo/renderer.rb in pixo-0.4.0 vs lib/pixo/renderer.rb in pixo-0.4.1
- old
+ new
@@ -7,10 +7,14 @@
super(o, i)
@service_thread = Thread.new { self.run }
end
def on_key(key, scancode, action, mods)
-
+ if (action == 0)
+ self.pattern = self.list_patterns.sample
+ return true
+ end
+ return false
end
def list_patterns
request(Pixo::Rpc::ListPatterns.new)
end