Skip to content

Commit 87cad82

Browse files
committed
Update for Fall IGL Circuit
1 parent fd58d11 commit 87cad82

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

hotkeys.go

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,23 @@ package main
33
import (
44
"log"
55

6-
"github.com/go-vgo/robotgo"
76
hook "github.com/robotn/gohook"
87
)
98

109
func AddEventHotkeys() {
1110
mode := 0
1211

13-
robotgo.EventHook(hook.KeyDown, []string{"q", "ctrl", "shift"}, func(e hook.Event) {
12+
hook.Register(hook.KeyDown, []string{"q", "ctrl", "shift"}, func(e hook.Event) {
1413
log.Println("ctrl-shift-q")
15-
robotgo.EventEnd()
14+
hook.End()
1615
})
1716

18-
robotgo.EventHook(hook.KeyDown, []string{"r", "ctrl", "shift"}, func(e hook.Event) {
17+
hook.Register(hook.KeyDown, []string{"r", "ctrl", "shift"}, func(e hook.Event) {
1918
log.Println("Reset Timer Hotkey Pressed")
2019
UpdateTimer("ResetTimer")
2120
})
2221

23-
robotgo.EventHook(hook.KeyDown, []string{"t", "ctrl", "shift"}, func(e hook.Event) {
22+
hook.Register(hook.KeyDown, []string{"t", "ctrl", "shift"}, func(e hook.Event) {
2423
log.Println("Toggle Start/Stop Timer Hotkey Pressed")
2524
switch mode {
2625
case 0:
@@ -36,20 +35,20 @@ func AddEventHotkeys() {
3635
}
3736
})
3837

39-
s := robotgo.EventStart()
38+
s := hook.Start()
4039
// defer robotgo.EventEnd()
41-
<-robotgo.EventProcess(s)
40+
<-hook.Process(s)
4241
}
4342

4443
func AddScoreboardHotkeys(UIUpdate func()) {
45-
robotgo.EventHook(hook.KeyDown, []string{"b", "ctrl", "shift"}, func(e hook.Event) {
44+
hook.Register(hook.KeyDown, []string{"b", "ctrl", "shift"}, func(e hook.Event) {
4645
log.Println("Increment Blue Hotkey Presssed")
4746
s.IncrementHome()
4847
UpdateScoreBoard(&s)
4948
UIUpdate()
5049
})
5150

52-
robotgo.EventHook(hook.KeyDown, []string{"g", "ctrl", "shift"}, func(e hook.Event) {
51+
hook.Register(hook.KeyDown, []string{"g", "ctrl", "shift"}, func(e hook.Event) {
5352
log.Println("Increment Gold Hotkey Pressed")
5453
s.IncrementAway()
5554
UpdateScoreBoard(&s)

igl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"strings"
1313
)
1414

15-
const CircuitAPIURL = "https://indy-gaming-league-api.herokuapp.com/api/circuits?data=%7B%22motherCircuitId%22:%225ec8428a2cbb1c4439c29e6c%22,%22live%22:false,%22active%22:true,%22hidden%22:false,%22game%22:%22KILLER%20QUEEN%20BLACK%22%7D"
15+
const CircuitAPIURL = "https://indy-gaming-league-api.herokuapp.com/api/circuits?data=%7B%22motherCircuitId%22:%225f380956d98a1a47bb52b692%22,%22live%22:true,%22active%22:false,%22hidden%22:false,%22game%22:%22KILLER%20QUEEN%20BLACK%22%7D"
1616

1717
type IGLCircuit struct {
1818
ID string `json:"id"`

0 commit comments

Comments
 (0)