mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-16 13:12:34 +00:00
Fixed hidden Container elements not recalculating when becoming visible
This commit is contained in:
@@ -151,10 +151,6 @@ module CyberarmEngine
|
|||||||
end
|
end
|
||||||
|
|
||||||
def recalculate
|
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)
|
@current_position = Vector.new(@style.margin_left + @style.padding_left, @style.margin_top + @style.padding_top)
|
||||||
|
|
||||||
return unless visible?
|
return unless visible?
|
||||||
@@ -243,8 +239,6 @@ module CyberarmEngine
|
|||||||
recalculate_if_size_changed
|
recalculate_if_size_changed
|
||||||
|
|
||||||
# puts "TOOK: #{Gosu.milliseconds - s}ms to recalculate #{self.class}:0x#{self.object_id.to_s(16)}"
|
# puts "TOOK: #{Gosu.milliseconds - s}ms to recalculate #{self.class}:0x#{self.object_id.to_s(16)}"
|
||||||
|
|
||||||
@in_recalculate = false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def layout
|
def layout
|
||||||
|
|||||||
Reference in New Issue
Block a user