Este sitio web funciona mejor con JavaScript.
Inicio
Ayuda
Iniciar sesión
cacalabs
/
libcaca
réplica de
https://github.com/cacalabs/libcaca.git
Seguir
1
Destacar
0
Fork
0
Código
Incidencias
0
Lanzamientos
7
Wiki
Actividad
Explorar el Código
* Add Caca::Event#quit? to make tests nicer
tags/v0.99.beta14
Pascal Terjan
pterjan
hace 17 años
padre
095a3d1c5f
commit
0de0992e57
Se han
modificado 2 ficheros
con
9 adiciones
y
2 borrados
Dividir vista
Opciones de diferencias
Mostrar estadísticas
Descargar archivo de parche
Descargar archivo de diferencias
+8
-0
ruby/lib/caca.rb
+1
-2
ruby/ruby-caca.dox
+ 8
- 0
ruby/lib/caca.rb
Ver fichero
@@ -10,6 +10,9 @@ module Caca
i = i.to_i
const_get("TYPE")|i
end
def quit?
false
end
class Key
attr_reader :ch, :utf32, :utf8
def initialize(ch, utf32, utf8)
@@ -28,5 +31,10 @@ module Caca
@w, @h = w, h
end
end
class Quit
def quit?
true
end
end
end
end
+ 1
- 2
ruby/ruby-caca.dox
Ver fichero
@@ -56,8 +56,7 @@ c.draw_thin_polyline([[0,0], [0,2], [5,2], [0,0]])
d = Caca::Display.new(c)
d.title = "Test !"
d.refresh
while((e = d.get_event(Caca::Event, -1)) &&
! e.kind_of?(Caca::Event::Quit))
while((e = d.get_event(Caca::Event, -1)) && ! e.quit?)
p e
d.refresh
end
Escribir
Vista previa
Cargando…
Cancelar
Guardar