Fixed passing nil for :enabled state as boolean causing it to be set as true instead of false

This commit is contained in:
2021-12-22 14:58:17 -06:00
parent 153871e7f3
commit c35d587419

View File

@@ -13,9 +13,9 @@ module CyberarmEngine
@options = options
@block = block
@focus = @options[:focus].nil? ? false : @options[:focus]
@enabled = @options[:enabled].nil? ? true : @options[:enabled]
@visible = @options[:visible].nil? ? true : @options[:visible]
@focus = !@options.key?(:focus) ? false : @options[:focus]
@enabled = !@options.key?(:enabled) ? true : @options[:enabled]
@visible = !@options.key?(:visible) ? true : @options[:visible]
@tip = @options[:tip] || ""
@debug_color = @options[:debug_color].nil? ? Gosu::Color::RED : @options[:debug_color]