mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 21:33:59 +00:00
[android] Fix colors order
Signed-off-by: Andrei Shkrob <github@shkrob.dev>
This commit is contained in:
committed by
Konstantin Pastbin
parent
6c4503b0db
commit
d0bb8c1c49
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user