cyberarm_engine 0.8.0 → 0.8.1
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/container.rb +1 -1
- data/lib/cyberarm_engine/ui/dsl.rb +2 -2
- data/lib/cyberarm_engine/ui/edit_line.rb +0 -1
- data/lib/cyberarm_engine/ui/element.rb +4 -4
- data/lib/cyberarm_engine/ui/style.rb +18 -1
- data/lib/cyberarm_engine/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3fd7c0b09fa9487e4a543e508ac8e0ec56561ac34cb620230a49f7c4244b1b3
|
4
|
+
data.tar.gz: 6903fa77e7e3bda53f8cadc9d1915ea905330dd2dcbe8ac8e2a83043132f7256
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39089172ed27cb6e49958d740190f97a28311fcadc4c89e7ba09f0efa71966abcf1ed73cdaa3cc3bcecece699bce411cc670da504ed2c1ee6b18bb4c38f3c740
|
7
|
+
data.tar.gz: 847163bc84e4dad3161e4e8f8c0eae741c421423323692e11f88e089e62763166070608d435b3e2c9d8b49467d45f5fdec815974e750e722e69489c795eea702
|
@@ -6,7 +6,7 @@ module CyberarmEngine
|
|
6
6
|
_container = Flow.new(options, block)
|
7
7
|
@containers << _container
|
8
8
|
_container.build
|
9
|
-
|
9
|
+
_container.parent.add(_container)
|
10
10
|
@containers.pop
|
11
11
|
|
12
12
|
return _container
|
@@ -18,7 +18,7 @@ module CyberarmEngine
|
|
18
18
|
_container = Stack.new(options, block)
|
19
19
|
@containers << _container
|
20
20
|
_container.build
|
21
|
-
|
21
|
+
_container.parent.add(_container)
|
22
22
|
@containers.pop
|
23
23
|
|
24
24
|
return _container
|
@@ -8,7 +8,7 @@ module CyberarmEngine
|
|
8
8
|
attr_reader :parent, :options, :style, :event_handler, :background_canvas, :border_canvas
|
9
9
|
|
10
10
|
def initialize(options = {}, block = nil)
|
11
|
-
@parent = options
|
11
|
+
@parent = options.delete(:parent) # parent Container (i.e. flow/stack)
|
12
12
|
options = theme_defaults(options)
|
13
13
|
@options = options
|
14
14
|
@block = block
|
@@ -26,15 +26,15 @@ module CyberarmEngine
|
|
26
26
|
@fixed_x = @x if @x != 0
|
27
27
|
@fixed_y = @y if @y != 0
|
28
28
|
|
29
|
+
@style.width = default(:width) || $window.width
|
30
|
+
@style.height = default(:height) || $window.height
|
31
|
+
|
29
32
|
stylize
|
30
33
|
|
31
34
|
default_events
|
32
35
|
end
|
33
36
|
|
34
37
|
def stylize
|
35
|
-
@style.width = @style.width || $window.width
|
36
|
-
@style.height = @style.height || $window.height
|
37
|
-
|
38
38
|
set_border_thickness(@style.border_thickness)
|
39
39
|
|
40
40
|
set_padding(@style.padding)
|
@@ -1,7 +1,24 @@
|
|
1
|
+
module Gosu
|
2
|
+
class Color
|
3
|
+
def _dump(level)
|
4
|
+
[
|
5
|
+
"%02X" % self.alpha,
|
6
|
+
"%02X" % self.red,
|
7
|
+
"%02X" % self.green,
|
8
|
+
"%02X" % self.blue
|
9
|
+
].join
|
10
|
+
end
|
11
|
+
|
12
|
+
def self._load(hex)
|
13
|
+
argb(hex.to_i(16))
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
1
18
|
module CyberarmEngine
|
2
19
|
class Style
|
3
20
|
def initialize(hash = {})
|
4
|
-
@hash = hash
|
21
|
+
@hash = Marshal.load(Marshal.dump(hash))
|
5
22
|
end
|
6
23
|
|
7
24
|
def method_missing(method, *args, &block)
|