1 #ifndef COLORPROVIDER_HPP 2 #define COLORPROVIDER_HPP 7 #include <SFML/Graphics/Color.hpp> 10 typedef std::pair<ColorId::Type, sf::Color&> ColorRef;
11 typedef std::vector<ColorRef> ColorRefVector;
20 ColorInfo(
const sf::Color& color = sf::Color::Transparent,
bool enabled =
false):
30 std::map<StateId::Type, PairState> colorStateMap;
31 std::map<ColorId::Type, std::map<StateId::Type, ColorInfo>> colorInfoMap;
38 bool isStateRegistered(StateId::Type stateId)
const;
39 bool registerState(StateId::Type stateId,
const bool* state,
bool inverted =
false,
bool overwrite =
false);
40 inline bool registerState(StateId::Type stateId,
const PairState& pair,
bool overwrite =
false) {
41 return registerState(stateId, pair.first, pair.second, overwrite);
44 bool registerColor(ColorId::Type colorId,
bool logError =
true);
45 bool getRegisteredState(StateId::Type stateId, PairState& result);
46 bool setColorEnabled(ColorId::Type colorId, StateId::Type stateId,
bool enabled);
47 bool getColor(ColorId::Type colorId, StateId::Type stateId, sf::Color& result)
const;
48 bool setColor(ColorId::Type colorId, StateId::Type stateId, sf::Color newColor);
49 bool colorDeduce(
const ColorRef& colorRef)
const;
50 bool colorDeduce(
const ColorRefVector& colorRefVector)
const;
55 std::unique_ptr<Internal>
internal;
56 static const bool alwaysTrue;
58 void printColors()
const;
61 #endif // COLORPROVIDER_HPP Definition: ColorProvider.hpp:29
Definition: ColorProvider.hpp:15
Definition: Element.hpp:22
Definition: ColorProvider.hpp:19