mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-22 02:45:49 -04:00
support old <c hex>
syntax too for backwards compatability
This commit is contained in:
parent
7e87d675bc
commit
8de28d1e2a
1 changed files with 4 additions and 0 deletions
|
@ -82,6 +82,10 @@ Result<ccColor3B> colorForIdentifier(std::string const& tag) {
|
|||
if (tag.length() > 2 && tag[1] == '-') {
|
||||
return cc3bFromHexString(tag.substr(2));
|
||||
}
|
||||
// Support the old form of <carbitaryletters hex>
|
||||
else if (tag.find(' ') != std::string::npos) {
|
||||
return cc3bFromHexString(tag.substr(tag.find(' ') + 1));
|
||||
}
|
||||
else {
|
||||
auto colorText = tag.substr(1);
|
||||
if (!colorText.size()) {
|
||||
|
|
Loading…
Reference in a new issue