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:
2022-05-02 19:05:57 -05:00
parent a75afaf47a
commit be98fe47ad

View File

@@ -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)