2020-03-26 23:35:34 +00:00
|
|
|
package flow
|
|
|
|
|
|
|
|
func (f *Flow) linkNewGame() {
|
|
|
|
// New game
|
|
|
|
f.onClick(newGame, "2.1", f.setDriver(levelPly)) // New campaign button
|
|
|
|
f.onClick(newGame, "2.2", f.setDriver(singles)) // Single scenario button
|
|
|
|
f.onClick(newGame, "2.3", f.setDriver(randomMap)) // Random scenario button
|
|
|
|
f.onClick(newGame, "2.4", f.setDriver(main)) // Back button
|
|
|
|
|
|
|
|
f.linkLevelPly()
|
|
|
|
f.linkSingles()
|
|
|
|
f.linkRandomMap()
|
|
|
|
}
|
|
|
|
|
|
|
|
func (f *Flow) linkLevelPly() {
|
|
|
|
// We want the default difficulty level to be Veteran, not Hero.
|
|
|
|
// FIXME: Make the radio button respect changes via setValue
|
|
|
|
resetLevel := func() {
|
|
|
|
f.setValueBool(levelPly, "2.1", false)
|
|
|
|
f.setValueBool(levelPly, "2.2", true)
|
|
|
|
}
|
|
|
|
resetLevel()
|
|
|
|
|
|
|
|
f.onClick(levelPly, "2.5", func() { // Back button
|
|
|
|
resetLevel()
|
|
|
|
f.setDriverNow(newGame)
|
|
|
|
})
|
|
|
|
|
2020-03-27 02:07:28 +00:00
|
|
|
// FIXME: we should select a savegame if Mighty Hero is selected here
|
2020-03-26 23:35:34 +00:00
|
|
|
// FIXME: we should show a movie here. Need an internal SMK player first
|
|
|
|
// FIXME: we should set up new game state here!
|
2020-04-11 00:13:28 +01:00
|
|
|
f.onClick(levelPly, "2.7", func() { // Select button
|
|
|
|
f.ship.NextScenario = f.generic.CampaignMaps[0]
|
|
|
|
f.setDriverNow(bridge)
|
|
|
|
})
|
2020-03-27 02:07:28 +00:00
|
|
|
|
|
|
|
// Link children
|
|
|
|
f.linkBridge()
|
2020-03-26 23:35:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (f *Flow) linkSingles() {
|
|
|
|
f.onClick(singles, "4.11", f.setDriver(newGame)) // Back button
|
|
|
|
}
|
|
|
|
|
|
|
|
func (f *Flow) linkRandomMap() {
|
|
|
|
f.onClick(randomMap, "2.19", f.setDriver(newGame)) // Back button
|
|
|
|
}
|