Repository navigation
|
Hi Spawnova, |
Replies: 6 comments 1 reply
|
Sure, the main purpose of the callbacks is to know when the overlay is being moved, resized or the state changes without having to constantly check #include shinsoverlayclass.ahk
overlay := new ShinsOverlayClass("TITLE_HERE")
overlay.RegCallback(func("_OnSize"),"size") ;callback if size changes
overlay.RegCallback(func("_OnPosition"),"position") ;callback is position changes
overlay.RegCallback(func("_OnActive"),"Active") ;callback if the overlay drawing state changes
loop {
if (overlay.BeginDraw()) {
overlay.DrawCircle(50,50,10,0xFFFF0000) ;drawing stuff here
overlay.DrawText("F8 - Exitapp",5,5,24)
overlay.EndDraw()
}
}
f8::exitapp
_OnActive(overlay,state) {
tooltip % "Overlay state has changed it is now: " (state ? "Active" : "Inactive")
}
_OnSize(overlay) {
tooltip % "Overlay size has changed, new size: " overlay.width ", " overlay.height
}
_OnPosition(overlay) {
tooltip % "Overlay position has changed, new position: " overlay.x ", " overlay.y
} |
|
The callbacks are only for interactions with the overlay, it only supports the 3 examples that I listed, You probably need to tighten up how you search for what ability is on cooldown, seems like the image detection may be the issue |
|
Of course, the 3rd parameter when creating the overlay is a boolean which enabled always showing the overlay even when target window is not in the foreground overlay := new ShinsOverlayClass("TITLE_HERE",1,0) ;title, client space, foreground only disabledalternatively you can set Glad you are having fun with the class =) |
|
Thank you. |



Sure, the main purpose of the callbacks is to know when the overlay is being moved, resized or the state changes without having to constantly check