Ce site fonctionne mieux avec JavaScript.
Accueil
Aide
Connexion
cacalabs
/
libcaca
miroir de
https://github.com/cacalabs/libcaca.git
Suivre
1
Ajouter aux favoris
0
Bifurcation
0
Code
Tickets
0
Versions
7
Wiki
Activité
Parcourir la source
* Add Caca::Event#quit? to make tests nicer
tags/v0.99.beta14
Pascal Terjan
pterjan
il y a 17 ans
Parent
095a3d1c5f
révision
0de0992e57
2 fichiers modifiés
avec
9 ajouts
et
2 suppressions
Vue séparée
Option de Diff
Voir les Statistiques
Télécharger le Fichier Patch
Télécharger le Fichier des Différences
+8
-0
ruby/lib/caca.rb
+1
-2
ruby/ruby-caca.dox
+ 8
- 0
ruby/lib/caca.rb
Voir le fichier
@@ -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
Voir le fichier
@@ -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
Écrire
Aperçu
Chargement…
Annuler
Enregistrer