mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-16 13:12:34 +00:00
Compare commits
4 Commits
c2330ed9a9
...
a7df9a660d
| Author | SHA1 | Date | |
|---|---|---|---|
| a7df9a660d | |||
| d2f757eb23 | |||
| 0d70177de7 | |||
| dcefaeae4d |
@@ -331,8 +331,7 @@ module CyberarmEngine
|
|||||||
end
|
end
|
||||||
|
|
||||||
def debug_draw
|
def debug_draw
|
||||||
# FIXME
|
return if CyberarmEngine.const_defined?("GUI_DEBUG_ONLY_ELEMENT") && self.class == GUI_DEBUG_ONLY_ELEMENT
|
||||||
return# if const_defined?(GUI_DEBUG_ONLY_ELEMENT) && self.class == GUI_DEBUG_ONLY_ELEMENT
|
|
||||||
|
|
||||||
Gosu.draw_line(
|
Gosu.draw_line(
|
||||||
x, y, @debug_color,
|
x, y, @debug_color,
|
||||||
@@ -350,7 +349,7 @@ module CyberarmEngine
|
|||||||
Float::INFINITY
|
Float::INFINITY
|
||||||
)
|
)
|
||||||
Gosu.draw_line(
|
Gosu.draw_line(
|
||||||
x, outer_height, @debug_color,
|
x, y + outer_height, @debug_color,
|
||||||
x, y, @debug_color,
|
x, y, @debug_color,
|
||||||
Float::INFINITY
|
Float::INFINITY
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ module CyberarmEngine
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
attr_reader :step_size, :value
|
attr_reader :value
|
||||||
attr_accessor :range, :step_size
|
attr_accessor :range, :step_size
|
||||||
|
|
||||||
def initialize(options = {}, block = nil)
|
def initialize(options = {}, block = nil)
|
||||||
@@ -47,7 +47,7 @@ module CyberarmEngine
|
|||||||
add(@handle)
|
add(@handle)
|
||||||
end
|
end
|
||||||
|
|
||||||
def layout
|
def recalculate
|
||||||
_width = dimensional_size(@style.width, :width)
|
_width = dimensional_size(@style.width, :width)
|
||||||
_height = dimensional_size(@style.height, :height)
|
_height = dimensional_size(@style.height, :height)
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ module CyberarmEngine
|
|||||||
@height = _height
|
@height = _height
|
||||||
|
|
||||||
position_handle
|
position_handle
|
||||||
@handle.layout
|
@handle.recalculate
|
||||||
@handle.update_background
|
@handle.update_background
|
||||||
|
|
||||||
update_background
|
update_background
|
||||||
|
|||||||
@@ -85,8 +85,7 @@ module CyberarmEngine
|
|||||||
@tip.draw
|
@tip.draw
|
||||||
end
|
end
|
||||||
|
|
||||||
# FIXME
|
if CyberarmEngine.const_defined?("GUI_DEBUG")
|
||||||
if false# defined?(GUI_DEBUG)
|
|
||||||
Gosu.flush
|
Gosu.flush
|
||||||
|
|
||||||
@root_container.debug_draw
|
@root_container.debug_draw
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
module CyberarmEngine
|
module CyberarmEngine
|
||||||
NAME = "InDev".freeze
|
NAME = "InDev".freeze
|
||||||
VERSION = "0.24.2".freeze
|
VERSION = "0.24.4".freeze
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user