#pragma once #include #include #include #include #include "drawtypes/icon.hpp" namespace drawtypes { class Ramp { protected: std::vector> icons; public: Ramp(){} explicit Ramp(std::vector> icons); void add(std::unique_ptr &&icon); std::unique_ptr &get(int idx); std::unique_ptr &get_by_percentage(float percentage); operator bool() { return this->icons.size() > 0; } }; std::unique_ptr get_config_ramp(const std::string& module_name, const std::string& ramp_name = "ramp", bool required = true); }