mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-16 13:12:34 +00:00
Increased scroll speed and added window_size_changed event for containers that is thrown from the root container
This commit is contained in:
@@ -11,11 +11,13 @@ module CyberarmEngine
|
||||
super
|
||||
|
||||
@scroll_position = Vector.new(0, 0)
|
||||
@scroll_speed = 10
|
||||
@scroll_speed = 40
|
||||
|
||||
@text_color = options[:color]
|
||||
|
||||
@children = []
|
||||
|
||||
event(:window_size_changed)
|
||||
end
|
||||
|
||||
def build
|
||||
|
||||
@@ -105,7 +105,10 @@ module CyberarmEngine
|
||||
@last_mouse_pos = Vector.new(window.mouse_x, window.mouse_y)
|
||||
@mouse_pos = @last_mouse_pos.clone
|
||||
|
||||
request_recalculate if @active_width != window.width || @active_height != window.height
|
||||
if @active_width != window.width || @active_height != window.height
|
||||
request_recalculate
|
||||
@root_container.publish(:window_size_changed)
|
||||
end
|
||||
|
||||
@active_width = window.width
|
||||
@active_height = window.height
|
||||
|
||||
Reference in New Issue
Block a user