mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-14 19:15:05 -05:00
add color3b for convenience
This commit is contained in:
parent
082ad7b260
commit
f5f2a6450d
2 changed files with 9 additions and 0 deletions
|
@ -104,5 +104,11 @@ namespace geode {
|
|||
* @returns The value of the color, or ccWHITE if the ID doesn't exist
|
||||
*/
|
||||
cocos2d::ccColor4B color(std::string const& id) const;
|
||||
/**
|
||||
* Get the current value of a color as a ccColor3B
|
||||
* @param id The ID of the color
|
||||
* @returns The value of the color, or ccWHITE if the ID doesn't exist
|
||||
*/
|
||||
cocos2d::ccColor3B color3b(std::string const& id) const;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -69,3 +69,6 @@ ccColor4B ColorProvider::color(std::string const& id) const {
|
|||
return to4B(ccWHITE);
|
||||
}
|
||||
}
|
||||
ccColor3B ColorProvider::color3b(std::string const& id) const {
|
||||
return to3B(this->color(id));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue