diff options
| author | Jeff Carr <[email protected]> | 2019-05-30 11:56:34 -0700 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2019-05-30 11:56:34 -0700 |
| commit | d617938702a9f8d9cb3a6a5a04decba6b198d116 (patch) | |
| tree | 62b0d735ea596a40382f0389dc10ade90337a001 /gui.go | |
| parent | c15c731e7f7746dc5cd85cde4650a4e44a4837c7 (diff) | |
change to pointers correctly
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'gui.go')
| -rw-r--r-- | gui.go | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -185,13 +185,13 @@ func defaultButtonClick(button *ui.Button) { log.Println("\tdefaultButtonClick() Data.AllButtons[key].Action =", Data.AllButtons[key].Action) if Data.AllButtons[key].custom != nil { log.Println("\tdefaultButtonClick() DOING CUSTOM FUNCTION") - var tmp GuiButton + var tmp *GuiButton tmp = Data.AllButtons[key] // spew.Dump(tmp) - Data.AllButtons[key].custom(&tmp) + Data.AllButtons[key].custom(tmp) return } - mouseClick(&Data.AllButtons[key]) + mouseClick(Data.AllButtons[key]) return } } @@ -207,7 +207,7 @@ func AddButton(b *GuiButton, name string) *ui.Button { newB.OnClicked(defaultButtonClick) b.B = newB - Data.AllButtons = append(Data.AllButtons, *b) + Data.AllButtons = append(Data.AllButtons, b) return newB } @@ -225,7 +225,7 @@ func CreateButton(wm *GuiWindow, a *pb.Account, vm *pb.Event_VM, newB.WM = wm newB.Action = action newB.custom = custom - Data.AllButtons = append(Data.AllButtons, *newB) + Data.AllButtons = append(Data.AllButtons, newB) return newB } @@ -238,10 +238,10 @@ func CreateFontButton(wm *GuiWindow, action string) *GuiButton { newBM.Action = action newBM.FB = newB newBM.AH = wm.AH - Data.AllButtons = append(Data.AllButtons, newBM) + Data.AllButtons = append(Data.AllButtons, &newBM) newB.OnChanged(func (*ui.FontButton) { - log.Println("FontButton.OnChanged() START mouseClick(&newBM)", &newBM) + log.Println("FontButton.OnChanged() START mouseClick(&newBM)", newBM) mouseClick(&newBM) }) return &newBM |
