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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 699e78a7d87b5875ccefeffd1376baa7653b07c29a401381496257f764fcfc25
4
- data.tar.gz: 7d577da5ae1d17297b0be0e9be536496717fb7807849ce05451a27ee061ae807
3
+ metadata.gz: d3fd7c0b09fa9487e4a543e508ac8e0ec56561ac34cb620230a49f7c4244b1b3
4
+ data.tar.gz: 6903fa77e7e3bda53f8cadc9d1915ea905330dd2dcbe8ac8e2a83043132f7256
5
5
  SHA512:
6
- metadata.gz: c6bcd42a625b081fe5ea5c0d7c5246c3612ed26a1e9c47f74d44a1cab35ebe6a1916afa5d5f0d490134ad9b7aba5ce14d591f4b5c1566af8955b80be9950f102
7
- data.tar.gz: 785d8b59ab8404569cd89ad12b0eaeac189d03995c7c2045ee1a5b1be0f5aa50152aba747632c495b193953c12a4bbd7e5af59fcbe83991e7e848459a9689f32
6
+ metadata.gz: 39089172ed27cb6e49958d740190f97a28311fcadc4c89e7ba09f0efa71966abcf1ed73cdaa3cc3bcecece699bce411cc670da504ed2c1ee6b18bb4c38f3c740
7
+ data.tar.gz: 847163bc84e4dad3161e4e8f8c0eae741c421423323692e11f88e089e62763166070608d435b3e2c9d8b49467d45f5fdec815974e750e722e69489c795eea702
@@ -66,7 +66,7 @@ module CyberarmEngine
66
66
  @children.each do |child|
67
67
  child.x += @x
68
68
  child.y += @y
69
-
69
+
70
70
  child.stylize
71
71
  child.recalculate
72
72
  child.reposition # TODO: Implement top,bottom,left,center, and right positioning
@@ -6,7 +6,7 @@ module CyberarmEngine
6
6
  _container = Flow.new(options, block)
7
7
  @containers << _container
8
8
  _container.build
9
- options[:parent].add(_container)
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
- options[:parent].add(_container)
21
+ _container.parent.add(_container)
22
22
  @containers.pop
23
23
 
24
24
  return _container
@@ -5,7 +5,6 @@ module CyberarmEngine
5
5
 
6
6
  @type = default(:type)
7
7
 
8
-
9
8
  @caret_width = default(:caret_width)
10
9
  @caret_height= @text.height
11
10
  @caret_color = default(:caret_color)
@@ -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[:parent] # parent Container (i.e. flow/stack)
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)
@@ -1,4 +1,4 @@
1
1
  module CyberarmEngine
2
2
  NAME = "InDev"
3
- VERSION = "0.8.0"
3
+ VERSION = "0.8.1"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cyberarm_engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyberarm