sb.StardustSuite icon indicating copy to clipboard operation
sb.StardustSuite copied to clipboard

Context Menus going off the edge of the screen

Open WasabiRaptor opened this issue 2 years ago • 2 comments

Context menus, if used by a UI element near the bottom or right edge of the screen, can go off the edge and leave some of its selections either partially unreadable, or not visible or selectable on the whole, context menus should go upwards and be offset horizontally from the click so as to not go off the edge of the screen

WasabiRaptor avatar Jun 11 '22 05:06 WasabiRaptor

This actually needs some tech to figure out the UI-relative screen size (Starbound doesn't provide a way to get at it, so we need to do some anchor-and-canvas trickery to check)

note to self: do this on pane opening!

On Sat, Jun 11, 2022, 1:50 AM WasabiRaptor @.***> wrote:

Context menus, if used by a UI element near the bottom or right edge of the screen, can go off the edge and leave some of its selections either partially unreadable, or not visible or selectable on the whole, context menus should go upwards and be offset horizontally from the click so as to not go off the edge of the screen

— Reply to this email directly, view it on GitHub https://github.com/zetaPRIME/sb.StardustSuite/issues/28, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABS5V6VASYPN7EJE5PA26TTVOQSKHANCNFSM5YPRO22A . You are receiving this because you are subscribed to this thread.Message ID: @.***>

zetaPRIME avatar Jun 11 '22 12:06 zetaPRIME

as this is mainly a problem with UIs that are anchored to the bottom and right corner of the screen, for those ones I don't believe it should be too hard to do some math based off of the canvas click position, knowing the window size and anchor offsets and all

WasabiRaptor avatar Jun 15 '22 02:06 WasabiRaptor