I have a game view that has a board and I have several parts in a VStack and the final 2 HStack are some 'buttons' and then a row of tiles for the game.
VStack(spacing: 5) {
HStack {}
HStack {}
......
......
HStack {
ResetButton {
self.returnLetters()
}
NewLine {
self.newLine()
}
CalcButton {
self.calcButton()
}
StartButton {
self.startButton()
}
}
HStack {
ForEach(0..<7) { number in
Letter(text: self.tray[number], index: number, onChanged: self.letterMoved, onEnded: self.letterDropped)
}
}
This sets the screen all very well However I would ideally not want to show the Start and Calc buttons until later in the game, or indeed replace the Reset and NewLine buttons with Start and Calc.
Ideally What I would have until later in game
Changing to this on the last go
Is there a way to not show items in the Stack or add items to the stack later please?
thanks