Exemplo n.º 1
0
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)
	}
}
Exemplo n.º 2
0
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)
		}
	}
}