Created
April 6, 2020 06:55
-
-
Save wizard1066/e7f437464258dab024bc2ebc092fc065 to your computer and use it in GitHub Desktop.
abgwtp18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HStack(alignment: .center) { | |
Spacer().padding() | |
Stepper("Cell", onIncrement: { | |
if self.sliderValue < cellsUsed(sliderDB: self.sliderDB, figures: self.rect.count) { | |
let (id, figure, color) = self.sliderDB[Int(self.sliderValue)] | |
if id != nil { | |
self.textText[id!] = figure! | |
self.textColors[id!] = color! | |
} | |
self.sliderValue += 1 | |
} | |
}, onDecrement: { | |
if self.sliderValue != 0 { | |
self.sliderValue -= 1 | |
let (id, _, _) = self.sliderDB[Int(self.sliderValue)] | |
if id != nil { | |
self.textText[id!] = "" | |
self.textColors[id!] = Color.clear | |
} | |
} | |
}).font(Fonts.futuraCondensedMedium(size: 20)) | |
Spacer().padding() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment