2 Commits

Author SHA1 Message Date
4642056576 Bumped version 2019-06-21 18:54:54 -05:00
3d2402b7f7 Fixed Image and EditLine sizing messed out 2019-06-21 18:54:30 -05:00
6 changed files with 26 additions and 10 deletions

View File

@@ -6,7 +6,7 @@ module CyberarmEngine
_container = Flow.new(options, block)
@containers << _container
_container.build
options[:parent].add(_container)
_container.parent.add(_container)
@containers.pop
return _container
@@ -18,7 +18,7 @@ module CyberarmEngine
_container = Stack.new(options, block)
@containers << _container
_container.build
options[:parent].add(_container)
_container.parent.add(_container)
@containers.pop
return _container

View File

@@ -5,7 +5,6 @@ module CyberarmEngine
@type = default(:type)
@caret_width = default(:caret_width)
@caret_height= @text.height
@caret_color = default(:caret_color)

View File

@@ -8,7 +8,7 @@ module CyberarmEngine
attr_reader :parent, :options, :style, :event_handler, :background_canvas, :border_canvas
def initialize(options = {}, block = nil)
@parent = options[:parent] # parent Container (i.e. flow/stack)
@parent = options.delete(:parent) # parent Container (i.e. flow/stack)
options = theme_defaults(options)
@options = options
@block = block
@@ -26,15 +26,15 @@ module CyberarmEngine
@fixed_x = @x if @x != 0
@fixed_y = @y if @y != 0
@style.width = default(:width) || $window.width
@style.height = default(:height) || $window.height
stylize
default_events
end
def stylize
@style.width = @style.width || $window.width
@style.height = @style.height || $window.height
set_border_thickness(@style.border_thickness)
set_padding(@style.padding)

View File

@@ -1,7 +1,24 @@
module Gosu
class Color
def _dump(level)
[
"%02X" % self.alpha,
"%02X" % self.red,
"%02X" % self.green,
"%02X" % self.blue
].join
end
def self._load(hex)
argb(hex.to_i(16))
end
end
end
module CyberarmEngine
class Style
def initialize(hash = {})
@hash = hash
@hash = Marshal.load(Marshal.dump(hash))
end
def method_missing(method, *args, &block)

View File

@@ -1,4 +1,4 @@
module CyberarmEngine
NAME = "InDev"
VERSION = "0.8.0"
VERSION = "0.8.1"
end