summaryrefslogtreecommitdiff
path: root/gui.go
diff options
context:
space:
mode:
Diffstat (limited to 'gui.go')
-rw-r--r--gui.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/gui.go b/gui.go
index 40e42da..5c20a9a 100644
--- a/gui.go
+++ b/gui.go
@@ -199,6 +199,15 @@ func defaultButtonClick(button *ui.Button) {
mouseClick(nil)
}
+func AddButton(b *ButtonMap, name string) *ui.Button {
+ newB := ui.NewButton(name)
+ newB.OnClicked(defaultButtonClick)
+
+ b.B = newB
+ Data.AllButtons = append(Data.AllButtons, *b)
+ return newB
+}
+
func CreateButton(a *pb.Account, vm *pb.Event_VM,
name string, action string, custom func(*ButtonMap)) *ui.Button {
newB := ui.NewButton(name)