Skip to content

Commit

Permalink
Tooltips: improve placement to avoid source widget overlap
Browse files Browse the repository at this point in the history
Still need some tweaks for the secondary placement methods.
  • Loading branch information
Vultraz committed Dec 10, 2016
1 parent 9d51c40 commit 8da0284
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions data/gui/window/tooltip_large.cfg
Expand Up @@ -110,7 +110,7 @@ def set_y(m, w, s)
(
switch(
placement_method(m, w, s)
, 'I' , m.y - (w.y + 15)
, 'I' , m.y - (w.y + 5)
, 'II' , 5
, 'III' , m.y - w.y
, 'IV' , 5
Expand Down Expand Up @@ -156,7 +156,7 @@ def reevaluate_best_size(w, s)
#define __GUI_WINDOW_X
(
set_x(
loc(mouse_x, mouse_y)
loc(source_x + (source_w / 2), source_y + (source_h / 2))
, loc(window_width, window_height)
, loc(screen_width, screen_height))
)
Expand All @@ -165,7 +165,7 @@ def reevaluate_best_size(w, s)
#define __GUI_WINDOW_Y
(
set_y(
loc(mouse_x, mouse_y)
loc(source_x, source_y)
, loc(window_width, window_height)
, loc(screen_width, screen_height))
)#enddef
Expand Down

0 comments on commit 8da0284

Please sign in to comment.