Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
user95401 committed Mar 10, 2024
2 parents ccd2652 + de9fa85 commit 0c7873b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions _Src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class $modify(LevelSelectLayer) {
};
ccColor3B colorForPage(int page) {
ccColor3B _ccColor3B = LevelSelectLayer::colorForPage(page);

/*
std::string MainSection = fmt::format("colorForPage");
std::string MainVal = fmt::format("{}", page);
std::string IniPath = FilePathFromModFolder("_PageColors.ini");
Expand All @@ -180,20 +180,20 @@ class $modify(LevelSelectLayer) {
Ini.LoadFile(IniPath.c_str());
//Color
/*if (!(Ini.KeyExists(MainSection.c_str(), MainVal.c_str())))
if (!(Ini.KeyExists(MainSection.c_str(), MainVal.c_str())))
Ini.SetValue(
MainSection.c_str(),
MainVal.c_str(),
fmt::format("{},{},{}", _ccColor3B.r, _ccColor3B.g, _ccColor3B.b).c_str()
);
else {
std::vector<std::string> rgb = explode(Ini.GetValue(MainSection.c_str(), MainVal.c_str()), ',');
_ccColor3B.r = stoi(rgb[0]);
_ccColor3B.g = stoi(rgb[1]);
_ccColor3B.b = stoi(rgb[2]);
}*/
_ccColor3B.r = atoi(rgb[0].data());
_ccColor3B.g = atoi(rgb[1].data());
_ccColor3B.b = atoi(rgb[2].data());
}
Ini.SaveFile(IniPath.c_str());
Ini.SaveFile(IniPath.c_str());*/

return _ccColor3B;
}
Expand Down

0 comments on commit 0c7873b

Please sign in to comment.