-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bf180eb
commit d635894
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#Include _JXON.ahk | ||
|
||
class T | ||
{ | ||
static Tooltips := Map() | ||
static TooltipTimerHwnd := "" | ||
|
||
CurrentText := "" | ||
LastText := "" | ||
Duration := "" | ||
fnOff := "" | ||
WhichToolTip := "" | ||
extraOffsetY := "" | ||
Hwnd := "" | ||
ToolTipHeight := "" | ||
YOffset := "" | ||
|
||
__New( | ||
CurrentText, | ||
Duration | ||
) { | ||
this.CurrentText := CurrentText | ||
this.Duration := Duration | ||
} | ||
|
||
LoopShowTooltips() | ||
{ | ||
for k,v in T.tooltips | ||
{ | ||
tooltip( k . dbg(v), 10, 10, k) | ||
} | ||
} | ||
|
||
ShowTooltip() | ||
{ | ||
; SetTimer(LoopShowTooltips, 10) | ||
|
||
; TODO: use A_Tick count to set the time after which this tooltip should be off. | ||
; in this way i dont have to store start and stop functions for each tooltip | ||
} | ||
|
||
|
||
/* | ||
Technical: ToString is not needed because i'm using a JSON library to dump everything to string | ||
*/ | ||
} | ||
|
||
|
||
|
||
t1 := T("curr 1", 123) | ||
t2 := T("curr 2", 456) | ||
|
||
t.tooltips[16] := t1 | ||
t.tooltips[10] := t2 | ||
|
||
;msgbox dbg(T) | ||
|
||
t1.CurrentText := "AAAAAAAAAAAAAAAAAA" | ||
;msgbox dbg(T) | ||
|
||
|
||
dbg(obj) | ||
{ | ||
return JxonEncode(obj, 1) | ||
} | ||
|
||
;^j::T. |