added new version of road generation with dynamic road numbers based on number of buildings

This commit is contained in:
Grimsace
2026-02-26 11:05:38 -06:00
parent 3c1312c81c
commit 2c7af98fb4
5 changed files with 603 additions and 269 deletions
+3
View File
@@ -107,8 +107,11 @@ func newNumericInputSlider(min, max float64, initialValue float64, format string
// validate checks text entry for valid numeric input within the defined range
func (s *numericInputSlider) validate(text string, onError func(bool)) {
text = strings.TrimSpace(text)
text = strings.TrimSuffix(text, "px")
text = strings.TrimSuffix(text, "%")
text = strings.TrimSuffix(text, "°")
text = strings.TrimSpace(text)
val, err := strconv.ParseFloat(text, 64)
if err != nil {
s.errorLabel.SetText("Not a number")