diff options
| author | Jeff Carr <[email protected]> | 2019-05-27 17:23:19 -0700 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2019-05-27 17:23:19 -0700 |
| commit | 6b2131850817a78c57d7975bccf5fdf829dfb7e6 (patch) | |
| tree | 0b7feef1e8fff3499558c261932d07ccc5181caf /gui.go | |
| parent | acefe2924215e3c70129c4017e8d58afb53372e5 (diff) | |
continue the move to abstracted access to all GUI elements
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'gui.go')
| -rw-r--r-- | gui.go | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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) |
