mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-04 05:55:47 -07:00
Take gui.scale into account when repositioning tooltips
Patch by: joskar Differential Revision: https://code.wildfiregames.com/D749 This was SVN commit r19928.
This commit is contained in:
parent
1638727c23
commit
3fca871fd6
2 changed files with 4 additions and 1 deletions
|
|
@ -106,6 +106,7 @@
|
|||
{"nick": "Jgwman"},
|
||||
{"nick": "JonBaer", "name": "Jon Baer"},
|
||||
{"nick": "Josh", "name": "Joshua J. Bakita"},
|
||||
{"nick": "joskar", "name": "Johnny Oskarsson"},
|
||||
{"nick": "jP_wanN", "name": "Jonas Platte"},
|
||||
{"nick": "Jubalbarca", "name": "James Baillie"},
|
||||
{"nick": "JubJub", "name": "Sebastian Vetter"},
|
||||
|
|
|
|||
|
|
@ -127,7 +127,9 @@ void CTooltip::SetupText()
|
|||
// Reposition the tooltip if it's falling off the screen:
|
||||
|
||||
extern int g_xres, g_yres;
|
||||
float screenw = (float)g_xres, screenh = (float)g_yres;
|
||||
extern float g_GuiScale;
|
||||
float screenw = g_xres / g_GuiScale;
|
||||
float screenh = g_yres / g_GuiScale;
|
||||
|
||||
if (size.pixel.top < 0.f)
|
||||
size.pixel.bottom -= size.pixel.top, size.pixel.top = 0.f;
|
||||
|
|
|
|||
Loading…
Reference in a new issue