cyberarm_engine 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cyberarm_engine/ui/check_box.rb +8 -0
- data/lib/cyberarm_engine/ui/container.rb +5 -0
- data/lib/cyberarm_engine/ui/edit_line.rb +6 -0
- data/lib/cyberarm_engine/ui/element.rb +22 -0
- data/lib/cyberarm_engine/ui/image.rb +6 -0
- data/lib/cyberarm_engine/ui/label.rb +6 -0
- data/lib/cyberarm_engine/ui/toggle_button.rb +6 -0
- data/lib/cyberarm_engine/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4a3c6c90047eb40c2b9ca055ebe48a03e4d7198c753b498fa5475aade057560
|
4
|
+
data.tar.gz: 3feb7cf1e88075eef8cf2cebd5bc140d5dd0dfd446b3cde768c8b599594da1e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c109e3788237c10b005f10288274e72073b8087a5d085e936aca3777049f534378232be4167daec1519edaf3c79428acdbdd91c7ff0d1b6ee6612c70df9bbc74
|
7
|
+
data.tar.gz: 00fd0b7150948cb35cffc0f413370fda115c5593a4dcd7664ece0fd816f7d7d40dbc68d368d3154671d8d2400c7c5fd8055f3309627878f69f5082c17bb2df1c
|
@@ -21,6 +21,14 @@ module CyberarmEngine
|
|
21
21
|
recalculate
|
22
22
|
end
|
23
23
|
|
24
|
+
def value
|
25
|
+
@toggle_button.value
|
26
|
+
end
|
27
|
+
|
28
|
+
def value=(bool)
|
29
|
+
@toggle_button.vlaue = bool
|
30
|
+
end
|
31
|
+
|
24
32
|
def define_label_singletons
|
25
33
|
@label.define_singleton_method(:_toggle_button) do |button|
|
26
34
|
@_toggle_button = button
|
@@ -53,6 +53,7 @@ module CyberarmEngine
|
|
53
53
|
# raise "#{self.class} 'padding' must be a number" unless @padding.is_a?(Numeric)
|
54
54
|
|
55
55
|
@enabled = true
|
56
|
+
@visible = true
|
56
57
|
|
57
58
|
default_events
|
58
59
|
end
|
@@ -122,7 +123,28 @@ module CyberarmEngine
|
|
122
123
|
@enabled
|
123
124
|
end
|
124
125
|
|
126
|
+
def visible?
|
127
|
+
@visible
|
128
|
+
end
|
129
|
+
|
130
|
+
def toggle
|
131
|
+
@visible = !@visible
|
132
|
+
root.recalculate
|
133
|
+
end
|
134
|
+
|
135
|
+
def show
|
136
|
+
@visible = true
|
137
|
+
root.recalculate
|
138
|
+
end
|
139
|
+
|
140
|
+
def hide
|
141
|
+
@visible = false
|
142
|
+
root.recalculate
|
143
|
+
end
|
144
|
+
|
125
145
|
def draw
|
146
|
+
return unless @visible
|
147
|
+
|
126
148
|
@background_canvas.draw
|
127
149
|
@border_canvas.draw
|
128
150
|
render
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cyberarm_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyberarm
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gosu
|