mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-15 12:42:34 +00:00
Fixed ListBox element menu getting cut off if it's near the bottom of the screen by stacking it ontop of the host element
This commit is contained in:
@@ -17,6 +17,8 @@ module CyberarmEngine
|
||||
@menu.define_singleton_method(:recalculate_menu) do
|
||||
@x = @__list_box.x
|
||||
@y = @__list_box.y + @__list_box.height
|
||||
|
||||
@y = @__list_box.y - height if @y + height > window.height
|
||||
end
|
||||
@menu.instance_variable_set(:"@__list_box", self)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user