Skip to content

Commit

Permalink
First steps for a better Tippy
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBestPessimist committed Aug 13, 2023
1 parent bf180eb commit d635894
Showing 1 changed file with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions lib/Tippy2.ahk
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.

0 comments on commit d635894

Please sign in to comment.