func moveClickPlay(t touch.Event, u *uistate.UIState) { if u.CurCard != nil { reposition.DragCard(t, u) } curPressed := findClickedButton(t, u) alreadyPressed := getPressed(u) if len(alreadyPressed) > 0 && len(curPressed) == 0 { unpressButtons(u) } }
func moveClickSplit(t touch.Event, u *uistate.UIState) { if u.CurCard != nil { reposition.DragCard(t, u) } curPressed := findClickedButton(t, u) alreadyPressed := getPressed(u) if len(alreadyPressed) > 0 && len(curPressed) == 0 { unpress := true for _, b := range alreadyPressed { if b == u.Buttons["toggleSplit"] { unpress = false } } if unpress { unpressButtons(u) } } }