Created
April 6, 2020 06:42
-
-
Save wizard1066/d8068108d979893897763e429e656479 to your computer and use it in GitHub Desktop.
abgwtp17
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.sliderData.sliderValue < cellsUsed(sliderDB: self.sliderDB, figures: self.rect.count) { | |
let (id, figure, color) = self.sliderDB[Int(self.sliderData.sliderValue)] | |
if id != nil { | |
self.textText[id!] = figure! | |
self.textColors[id!] = color! | |
} | |
self.sliderData.sliderValue += 1 | |
} | |
}, onDecrement: { | |
if self.sliderData.sliderValue != 0 { | |
self.sliderData.sliderValue -= 1 | |
let (id, _, _) = self.sliderDB[Int(self.sliderData.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