Compare commits

...

4 Commits

5 changed files with 7 additions and 15 deletions

View File

@@ -331,8 +331,7 @@ module CyberarmEngine
end
def debug_draw
# FIXME
return# if const_defined?(GUI_DEBUG_ONLY_ELEMENT) && self.class == GUI_DEBUG_ONLY_ELEMENT
return if CyberarmEngine.const_defined?("GUI_DEBUG_ONLY_ELEMENT") && self.class == GUI_DEBUG_ONLY_ELEMENT
Gosu.draw_line(
x, y, @debug_color,
@@ -350,7 +349,7 @@ module CyberarmEngine
Float::INFINITY
)
Gosu.draw_line(
x, outer_height, @debug_color,
x, y + outer_height, @debug_color,
x, y, @debug_color,
Float::INFINITY
)

View File

@@ -151,10 +151,6 @@ module CyberarmEngine
end
def recalculate
return if @in_recalculate
@in_recalculate = true
@current_position = Vector.new(@style.margin_left + @style.padding_left, @style.margin_top + @style.padding_top)
return unless visible?
@@ -243,8 +239,6 @@ module CyberarmEngine
recalculate_if_size_changed
# puts "TOOK: #{Gosu.milliseconds - s}ms to recalculate #{self.class}:0x#{self.object_id.to_s(16)}"
@in_recalculate = false
end
def layout

View File

@@ -33,7 +33,7 @@ module CyberarmEngine
end
end
attr_reader :step_size, :value
attr_reader :value
attr_accessor :range, :step_size
def initialize(options = {}, block = nil)
@@ -47,7 +47,7 @@ module CyberarmEngine
add(@handle)
end
def layout
def recalculate
_width = dimensional_size(@style.width, :width)
_height = dimensional_size(@style.height, :height)
@@ -55,7 +55,7 @@ module CyberarmEngine
@height = _height
position_handle
@handle.layout
@handle.recalculate
@handle.update_background
update_background

View File

@@ -85,8 +85,7 @@ module CyberarmEngine
@tip.draw
end
# FIXME
if false# defined?(GUI_DEBUG)
if CyberarmEngine.const_defined?("GUI_DEBUG")
Gosu.flush
@root_container.debug_draw

View File

@@ -1,4 +1,4 @@
module CyberarmEngine
NAME = "InDev".freeze
VERSION = "0.24.2".freeze
VERSION = "0.24.4".freeze
end