使用 JavaScript能使本网站更好的工作。
首页
帮助
登录
cacalabs
/
libcaca
镜像自地址
https://github.com/cacalabs/libcaca.git
关注
1
点赞
0
派生
0
代码
工单
0
版本发布
7
百科
动态
浏览代码
* Add Caca::Event#quit? to make tests nicer
tags/v0.99.beta14
Pascal Terjan
pterjan
17 年前
父节点
095a3d1c5f
当前提交
0de0992e57
共有
2 个文件被更改
,包括
9 次插入
和
2 次删除
分列视图
Diff 选项
显示统计
下载 Patch 文件
下载 Diff 文件
+8
-0
ruby/lib/caca.rb
+1
-2
ruby/ruby-caca.dox
+ 8
- 0
ruby/lib/caca.rb
查看文件
@@ -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
查看文件
@@ -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
撰写
预览
正在加载...
取消
保存