21 lines
900 B
Go
21 lines
900 B
Go
|
package flow
|
||
|
|
||
|
func (f *Flow) linkChoices() {
|
||
|
f.onClick(choices, "2.1", f.setReturningDriver(choices, loadGame)) // Load another game button
|
||
|
f.onClick(choices, "2.2", f.setReturningDriver(choices, saveGame)) // Save this game button
|
||
|
f.onClick(choices, "2.3", f.setReturningDriver(choices, options)) // More options button
|
||
|
f.onClick(choices, "2.4", func() { // New Game button. FIXME: should ask about the emperor
|
||
|
f.ship.Reset() // Throws away in-progress game
|
||
|
f.reset()
|
||
|
})
|
||
|
|
||
|
f.onClick(choices, "2.5", f.setReturningDriver(choices, credits)) // Credits button
|
||
|
f.onClick(choices, "2.6", f.setExit) // Quit button. FIXME: should ask about the emperor
|
||
|
f.onClick(choices, "2.7", f.returnToLastDriver(choices)) // Back button
|
||
|
|
||
|
// loadGame is linked by main
|
||
|
f.linkSaveGame()
|
||
|
// options is linked by main
|
||
|
f.linkCredits()
|
||
|
}
|