mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-16 13:12:34 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4642056576 | |||
| 3d2402b7f7 |
@@ -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
|
||||
|
||||
@@ -5,7 +5,6 @@ module CyberarmEngine
|
||||
|
||||
@type = default(:type)
|
||||
|
||||
|
||||
@caret_width = default(:caret_width)
|
||||
@caret_height= @text.height
|
||||
@caret_color = default(:caret_color)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module CyberarmEngine
|
||||
NAME = "InDev"
|
||||
VERSION = "0.8.0"
|
||||
VERSION = "0.8.1"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user