rutui 0.7 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile +4 -0
- data/README.md +79 -0
- data/examples/checkbox-radio.rb +7 -0
- data/examples/circle.rb +13 -0
- data/examples/colors.rb +12 -0
- data/examples/hello-input.rb +52 -0
- data/examples/hello-world.rb +66 -0
- data/examples/logo.rb +16 -0
- data/examples/res/colossal.flf +1136 -0
- data/examples/res/space-invader.axx +10 -0
- data/examples/res/space-invader_sprite.axx +73 -0
- data/examples/sortable-table.rb +49 -0
- data/examples/sprites.rb +36 -0
- data/examples/textfield.rb +36 -0
- data/examples/tic-tac-toe.rb +115 -0
- data/lib/rutui/ansi.rb +3 -1
- data/lib/rutui/checkbox.rb +96 -0
- data/lib/rutui/input.rb +219 -0
- data/lib/rutui/radio.rb +0 -0
- data/lib/rutui/screen.rb +5 -5
- data/lib/rutui/selectbox.rb +0 -0
- data/rutui.gemspec +12 -0
- metadata +24 -3
data/lib/rutui/radio.rb
ADDED
File without changes
|
data/lib/rutui/screen.rb
CHANGED
@@ -114,18 +114,18 @@ module RuTui
|
|
114
114
|
@map.each do |line|
|
115
115
|
line.each do |pixel|
|
116
116
|
if lastpixel != pixel
|
117
|
-
out
|
117
|
+
out << RuTui::Ansi.clear_color if lastpixel != 0
|
118
118
|
if pixel.nil?
|
119
|
-
out
|
119
|
+
out << "#{RuTui::Ansi.bg(@default.bg)}#{RuTui::Ansi.fg(@default.fg)}#{@default.symbol}"
|
120
120
|
else
|
121
|
-
out
|
121
|
+
out << "#{RuTui::Ansi.bg(pixel.bg)}#{RuTui::Ansi.fg(pixel.fg)}#{pixel.symbol}"
|
122
122
|
end
|
123
123
|
lastpixel = pixel
|
124
124
|
else
|
125
125
|
if pixel.nil?
|
126
|
-
out
|
126
|
+
out << @default.symbol
|
127
127
|
else
|
128
|
-
out
|
128
|
+
out << pixel.symbol
|
129
129
|
end
|
130
130
|
end
|
131
131
|
end
|
File without changes
|
data/rutui.gemspec
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = 'rutui'
|
3
|
+
s.version = '0.7.3'
|
4
|
+
s.summary = "RUby Textbased User Interface"
|
5
|
+
s.description = "Create Pure Ruby textbased interfaces of all kinds (Unix only)"
|
6
|
+
s.license = "MIT"
|
7
|
+
s.authors = ["Roman Pramberger"]
|
8
|
+
s.email = 'roman@pramberger.ch'
|
9
|
+
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
10
|
+
s.homepage = 'http://rubygems.org/gems/rutui'
|
11
|
+
s.required_ruby_version = '>= 2.0.0'
|
12
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rutui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roman Pramberger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Create Pure Ruby textbased interfaces of all kinds (Unix only)
|
14
14
|
email: roman@pramberger.ch
|
@@ -16,18 +16,39 @@ executables: []
|
|
16
16
|
extensions: []
|
17
17
|
extra_rdoc_files: []
|
18
18
|
files:
|
19
|
+
- ".gitignore"
|
20
|
+
- Gemfile
|
21
|
+
- README.md
|
22
|
+
- examples/checkbox-radio.rb
|
23
|
+
- examples/circle.rb
|
24
|
+
- examples/colors.rb
|
25
|
+
- examples/hello-input.rb
|
26
|
+
- examples/hello-world.rb
|
27
|
+
- examples/logo.rb
|
28
|
+
- examples/res/colossal.flf
|
29
|
+
- examples/res/space-invader.axx
|
30
|
+
- examples/res/space-invader_sprite.axx
|
31
|
+
- examples/sortable-table.rb
|
32
|
+
- examples/sprites.rb
|
33
|
+
- examples/textfield.rb
|
34
|
+
- examples/tic-tac-toe.rb
|
19
35
|
- lib/rutui.rb
|
20
36
|
- lib/rutui/ansi.rb
|
21
37
|
- lib/rutui/axx.rb
|
38
|
+
- lib/rutui/checkbox.rb
|
22
39
|
- lib/rutui/figlet.rb
|
40
|
+
- lib/rutui/input.rb
|
23
41
|
- lib/rutui/objects.rb
|
24
42
|
- lib/rutui/pixel.rb
|
43
|
+
- lib/rutui/radio.rb
|
25
44
|
- lib/rutui/screen.rb
|
26
45
|
- lib/rutui/screenmanager.rb
|
46
|
+
- lib/rutui/selectbox.rb
|
27
47
|
- lib/rutui/sprites.rb
|
28
48
|
- lib/rutui/table.rb
|
29
49
|
- lib/rutui/textfield.rb
|
30
50
|
- lib/rutui/theme.rb
|
51
|
+
- rutui.gemspec
|
31
52
|
homepage: http://rubygems.org/gems/rutui
|
32
53
|
licenses:
|
33
54
|
- MIT
|
@@ -48,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
48
69
|
version: '0'
|
49
70
|
requirements: []
|
50
71
|
rubyforge_project:
|
51
|
-
rubygems_version: 2.
|
72
|
+
rubygems_version: 2.5.1
|
52
73
|
signing_key:
|
53
74
|
specification_version: 4
|
54
75
|
summary: RUby Textbased User Interface
|