lib/cyberarm_engine/ui/element.rb in cyberarm_engine-0.15.0 vs lib/cyberarm_engine/ui/element.rb in cyberarm_engine-0.16.0
- old
+ new
@@ -11,13 +11,13 @@
@parent = options.delete(:parent) # parent Container (i.e. flow/stack)
options = theme_defaults(options)
@options = options
@block = block
- @focus = false
- @enabled = true
- @visible = true
- @tip = @options[:tip] || ""
+ @focus = @options[:focus].nil? ? false : @options[:focus]
+ @enabled = @options[:enabled].nil? ? true : @options[:enabled]
+ @visible = @options[:visible].nil? ? true : @options[:visible]
+ @tip = @options[:tip] || ""
@style = Style.new(options)
@root ||= nil
@gui_state ||= nil