[android] Fix colors order

Signed-off-by: Andrei Shkrob <github@shkrob.dev>
This commit is contained in:
Andrei Shkrob
2025-08-11 21:40:45 +02:00
committed by Konstantin Pastbin
parent 6c4503b0db
commit d0bb8c1c49
3 changed files with 40 additions and 4 deletions

View File

@@ -6,6 +6,7 @@
#include "base/assert.hpp"
#include "base/internal/message.hpp" // DebugPrint(Timestamp)
#include "base/stl_helpers.hpp"
#include "base/visitor.hpp"
#include "drape/color.hpp"
@@ -40,6 +41,31 @@ enum class PredefinedColor : uint8_t
Count
};
std::array constexpr kOrderedPredefinedColors = {
// clang-format off
PredefinedColor::None,
PredefinedColor::Red,
PredefinedColor::Pink,
PredefinedColor::Purple,
PredefinedColor::DeepPurple,
PredefinedColor::Blue,
PredefinedColor::LightBlue,
PredefinedColor::Cyan,
PredefinedColor::Teal,
PredefinedColor::Green,
PredefinedColor::Lime,
PredefinedColor::Yellow,
PredefinedColor::Orange,
PredefinedColor::DeepOrange,
PredefinedColor::Brown,
PredefinedColor::Gray,
PredefinedColor::BlueGray
// clang-format on
};
static_assert(kOrderedPredefinedColors.size() == static_cast<size_t>(PredefinedColor::Count),
"kOrderedPredefinedColors size must match PredefinedColor::Count");
static_assert(base::HasUniqueElements(kOrderedPredefinedColors), "All values must be unique");
inline std::string DebugPrint(PredefinedColor color)
{
switch (color)