Skip to content

Commit

Permalink
Support tooltip overwriting/recreation
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBestPessimist committed Aug 14, 2023
1 parent e635e46 commit cffb22b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/Tippy2.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ class T
this.DurationMs := durationMs
this.TimeEnd := A_TickCount + DurationMs

if(T.Tooltips.Has(whichTooltip))
T.OnTooltipExpired(whichTooltip)

T.Tooltips[whichTooltip] := this
T.StartLoop()
}
Expand Down Expand Up @@ -87,7 +90,10 @@ class T
}
else
{
WinMove(x, y,,, tt.Hwnd)
; if a tooltip exists and is being shown then gets deleted in the constructor, this will throw an error. Swallow it
try {
WinMove(x, y,,, tt.Hwnd)
}
}
currentTooltipsHeights += tt.Height

Expand Down

0 comments on commit cffb22b

Please sign in to comment.