hail.rb 2015.10.11.20.55 → 2015.10.12.00.44
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hail/gui.rb +7 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5a3f1e20a1ff59f487f66c521029a1e6208af1d
|
4
|
+
data.tar.gz: 2fbb4e2052803cefd5998861e0710edd7471241d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1eb9a5bd3c264afd10b3cabb66de923dd2d82bbeeb42784cb02289fca6d694dff7440082d704206ff5d586547abd4afffa806118f7474856460f44383746e278
|
7
|
+
data.tar.gz: a96b20927f4183c3c599b8a6efa219ef4b357b19a771b61768c82de07ac2f075186e9385e698bb9efdf6b59f1545be2643844916633cab706ea64782babcd04a
|
data/lib/hail/gui.rb
CHANGED
@@ -43,7 +43,7 @@ class Hash
|
|
43
43
|
header.to_hg(subarea)
|
44
44
|
|
45
45
|
#List
|
46
|
-
subarea = {height: area[:height]
|
46
|
+
subarea = {height: area[:height], width: i+1*width, top: area[:top] + header.__hg_height, left: area[:left]+(i*width)}
|
47
47
|
v.to_hg(subarea)
|
48
48
|
i += 1
|
49
49
|
end
|
@@ -54,7 +54,7 @@ class Array
|
|
54
54
|
def __hg_height
|
55
55
|
height = 0
|
56
56
|
self.each do |v|
|
57
|
-
height += v.__hg_height
|
57
|
+
height += v.__hg_height if not v.nil?
|
58
58
|
end
|
59
59
|
height
|
60
60
|
end
|
@@ -62,7 +62,7 @@ class Array
|
|
62
62
|
def to_hg(area)
|
63
63
|
top = area[:top]
|
64
64
|
self.each do |v|
|
65
|
-
subarea = {height: area[:
|
65
|
+
subarea = {height: area[:height]-top, width: area[:width], top: top, left: area[:left]}
|
66
66
|
if not v.nil?
|
67
67
|
v.to_hg(subarea)
|
68
68
|
top = top + v.__hg_height
|
@@ -91,7 +91,9 @@ class String
|
|
91
91
|
end
|
92
92
|
|
93
93
|
def to_hg(area)
|
94
|
-
|
95
|
-
|
94
|
+
if area[:height] >= self.__hg_height
|
95
|
+
Hail::GUI.instance.win.setpos(area[:top], area[:left])
|
96
|
+
Hail::GUI.instance.win.addstr(self.__truncate(area[:width]-3))
|
97
|
+
end
|
96
98
|
end
|
97
99
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hail.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2015.10.
|
4
|
+
version: 2015.10.12.00.44
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrien Jeser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: ''
|
14
14
|
email: adrien@jeser.me
|