Skip to content

Instantly share code, notes, and snippets.

@wizard1066
Created April 6, 2020 14:21
Show Gist options
  • Save wizard1066/f5cd43bd556e7d15eec0a2bcb4e47363 to your computer and use it in GitHub Desktop.
Save wizard1066/f5cd43bd556e7d15eec0a2bcb4e47363 to your computer and use it in GitHub Desktop.
abgwtp21
func cellHistoryV(column:Int, row:Int, tVcount:Int, poke:String, stepperInst:StepperData, textText:inout [String], textColors:inout [Color]) {
let newRec = stepperSteps(stepIndex: (fCalc(c: column, r: row, x: tVcount)), stepText: poke, stepColor: backgrounds[Int(poke)! - 1])
if textColors[fCalc(c: column, r: row, x: tVcount)] != Color.clear {
let index = stepperInst.stepperDB.firstIndex { $0.stepIndex == fCalc(c: column, r: row, x: tVcount) }
stepperInst.stepperDB[index!] = newRec
} else {
stepperInst.stepperDB[stepperInst.stepperValue] = newRec
stepperInst.stepperValue = stepperInst.stepperValue + 1
}
textText[fCalc(c: column, r: row, x: tVcount)] = poke
textColors[fCalc(c: column, r: row, x: tVcount)] = backgrounds[Int(poke)! - 1]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment