mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-16 13:12: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
|
@menu.define_singleton_method(:recalculate_menu) do
|
||||||
@x = @__list_box.x
|
@x = @__list_box.x
|
||||||
@y = @__list_box.y + @__list_box.height
|
@y = @__list_box.y + @__list_box.height
|
||||||
|
|
||||||
|
@y = @__list_box.y - height if @y + height > window.height
|
||||||
end
|
end
|
||||||
@menu.instance_variable_set(:"@__list_box", self)
|
@menu.instance_variable_set(:"@__list_box", self)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user