From 9eda2d2564e0489ac63cdcb0cf68ba4c93fdf1e2 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Thu, 12 Jan 2023 15:19:44 +0200 Subject: [PATCH] Color suggestions now match json format for easy copy-paste --- core/src/com/unciv/models/ruleset/RulesetValidator.kt | 5 +++-- core/src/com/unciv/ui/options/ModCheckTab.kt | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/com/unciv/models/ruleset/RulesetValidator.kt b/core/src/com/unciv/models/ruleset/RulesetValidator.kt index 0d489f5d05..92a2895026 100644 --- a/core/src/com/unciv/models/ruleset/RulesetValidator.kt +++ b/core/src/com/unciv/models/ruleset/RulesetValidator.kt @@ -96,8 +96,9 @@ class RulesetValidator(val ruleset: Ruleset) { val newOuterColor = nation.getOuterColor().cpy().lerp(outerLerpColor, 0.05f *i) if (getContrastRatio(newInnerColor, newOuterColor) > 3){ - text += "\n Suggested inner color: (${(newInnerColor.r*255).toInt()}, ${(newInnerColor.g*255).toInt()}, ${(newInnerColor.b*255).toInt()})" - text += "\n Suggested outer color: (${(newOuterColor.r*255).toInt()}, ${(newOuterColor.g*255).toInt()}, ${(newOuterColor.b*255).toInt()})" + text += "\nSuggested colors: " + text += "\n\t\t\"outerColor\": [${(newOuterColor.r*255).toInt()}, ${(newOuterColor.g*255).toInt()}, ${(newOuterColor.b*255).toInt()}]," + text += "\n\t\t\"innerColor\": [${(newInnerColor.r*255).toInt()}, ${(newInnerColor.g*255).toInt()}, ${(newInnerColor.b*255).toInt()}]," break } } diff --git a/core/src/com/unciv/ui/options/ModCheckTab.kt b/core/src/com/unciv/ui/options/ModCheckTab.kt index 4e83f2fa11..c812519361 100644 --- a/core/src/com/unciv/ui/options/ModCheckTab.kt +++ b/core/src/com/unciv/ui/options/ModCheckTab.kt @@ -135,7 +135,7 @@ class ModCheckTab( val label = Label(line.text, BaseScreen.skin) .apply { color = line.errorSeverityToReport.color } label.wrap = true - it.add(label).width(stage.width / 2).row() + it.add(label).width(stage.width / 2).pad(10f).row() } if (!noProblem) it.add("Copy to clipboard".toTextButton().onClick {