tooltips
Moderator: Oberlus
Forum rules
Always mention the exact version of FreeOrion you are testing.
When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Always mention the exact version of FreeOrion you are testing.
When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
tooltips
The recent reduction in tooltip delay has made me painfully aware of how often they substantially block the UI element I'm trying to interact with. Below is a typical happenstance, showing me trying to adjust the tooltip delay with almost no visibility of the widget.
I'm not positive the shortened delay is necessarily the problem, but has certainly made it more noticeable to me. It has also been interfering with my review of the production queue. The delay is the only thing I can control via options, but I am feeling that it would be better for the tooltips to appear higher above the cursor, or possibly more to the right, or both, or something.If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: tooltips
GG::BrowseInfoWnd has a boost::function,
that can be set to some other function to determine the position of the tooltip. A reasonable place to set this would probably be in the IconTextBrowseWnd constructor in InfoPanels.cpp, and similar constructors for any other customized tooltip classes.
The existing BrowseInfoWnd positioning code is:
That positions the browse wnd centred horizontally on the cursor, and above it so the bottom is just above the curor position. An alternative might be to position it to the bottom-right of the cursor, or on the edge of the control for which the browse wnd is being created, so it's not overlapping at all.
Code: Select all
mutable boost::function<
Pt (const Pt&, const boost::shared_ptr<Cursor>&, const BrowseInfoWnd&, const Wnd&)
> PositionWnd;
The existing BrowseInfoWnd positioning code is:
Code: Select all
void BrowseInfoWnd::Update(std::size_t mode, const Wnd* target)
{
UpdateImpl(mode, target);
Pt new_pos;
if (PositionWnd) {
new_pos = PositionWnd(m_cursor_pos, GUI::GetGUI()->GetCursor(), *this, *target);
} else {
const Y MARGIN(2);
new_pos = m_cursor_pos - Pt(Width() / 2, Height() + MARGIN);
}
MoveTo(new_pos);
[...]
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: tooltips
See the attached example that repositions a particular tooltip type. These appear for techs on the tree (and probably others, but that was the first I saw...)
- Attachments
-
[The extension patch has been deactivated and can no longer be displayed.]