re-implement the color debugging button
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
adfb25186b
commit
1af290c891
|
@ -24,8 +24,8 @@ func makeGuiButtonValues(box *gui.GuiBox, a *pb.Account, vm *pb.Event_VM,
|
|||
val.Accounts = config.Accounts
|
||||
val.VM = vm
|
||||
val.Custom = custom
|
||||
val.Name = "jcarr"
|
||||
val.Action = action
|
||||
val.Name = name
|
||||
// val.Action = action
|
||||
return val
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,12 @@ func makeButton(box *gui.GuiBox, a *pb.Account, vm *pb.Event_VM,
|
|||
return gui.CreateButton(box, custom, name, val)
|
||||
}
|
||||
|
||||
func makeColorButton(box *gui.GuiBox, a *pb.Account, vm *pb.Event_VM,
|
||||
name string, action string, custom func(*gui.GuiButton)) *gui.GuiButton {
|
||||
val := makeGuiButtonValues(box, a, vm, name, action, custom)
|
||||
return gui.CreateColorButton(box, custom, name, val)
|
||||
}
|
||||
|
||||
func mainMouseClick(b *gui.GuiButton) {
|
||||
defer r() // a golang trick to try to not crash on certain errors
|
||||
|
||||
|
|
|
@ -50,6 +50,7 @@ func debugClick(b *gui.GuiButton) {
|
|||
gui.NewLabel(Ybox3, "build date: " + BUILDTIME)
|
||||
|
||||
Ybox2 := gui.NewBox(hardXbox, gui.Yaxis, "subdomain Y test")
|
||||
makeColorButton(Ybox2, nil, nil, "COLOR73", "COLOR73", nil)
|
||||
makeButton(Ybox2, nil, nil, "Hide all tabs", "SUBDOMAIN", func (*gui.GuiButton) {
|
||||
log.Println("debugClick() Hide()")
|
||||
box := gw.BoxMap["MAINBOX"]
|
||||
|
|
Loading…
Reference in New Issue