Page 1 of 1

Tooltips off screen

Posted: Fri May 11, 2007 18:18
by Rakkar
Long tooltips, which could fit if they were centered better, go off the screen. How do I fix this?

Posted: Fri May 11, 2007 22:00
by Rackle
Look through my code in Menu & Popup Menu, within the onPopupMenu() function.

When opening a popup from a right click I measure it and move it if needbe. I'm guessing tooltips could benefit from the same type of code. There should be an event triggered when a popup is opening. My recommendation would be to subscribe to global events in order to catch every popup opening and checking its position relative to the screen.

Hrm, I'm not handling the opening of submenus, which could be offscreen. Menus in general need some tweaking; some of the code in that wiki should be included into the standard Cegui code, as options (ie activate auto-opening of submenus by setting a property to true).