Forum Moderator VegaS™ 10275 Posted February 19, 2019 Forum Moderator Share Posted February 19, 2019 M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) This is the hidden content, please Sign In or Sign Up ( GitHub ) Metin2 Color Formatter A simple class writted for Python and C++ which convert the param-values into an string by a specific color rgb as hexadecimals. Color constants module: https://www.webucator.com/blog/2015/03/python-color-constants-module/ https://www.color-hex.com/color/ccffff Python: from cff import CFF text = CFF.format('Metin2', 'green') text = CFF.format(8000, 'banana') text = CFF.format(412.55, 'red') text = CFF.format('Pending', '#113355') text = CFF.format('Item name:', 'springgreen', CFF.FLAG_NEW_TAB) + CFF.format(item.GetItemName(), 'chocolate') text = CFF.multi_format(('a', 'b', 'c'), 'red') # text[0], text[1], text[2] C++: #include "cff.h" std::string text = CFF::format("Metin2", "green"); std::string text = CFF::format(std::to_string(8000), "banana"); std::string text = CFF::format(std::to_string(412.55), "red"); std::string text = CFF::format("Pending", "#113355"); std::string text = CFF::format("Item name:", "springgreen", CFF::FLAG_NEW_TAB) + CFF::format(pItemData->GetName(), "chocolate"); std::vector<string> text = CFF::multi_format({"a", "b", "c"}, "red"); // text[0], text[1], text[2] Github repository: This is the hidden content, please Sign In or Sign Up 26 1 1 5 3 22 Check my GitHub Profile Click to find all the threads started by me [TOOL] Text file loader + JSON Link to comment Share on other sites More sharing options...
Honorable Member martysama0134 7178 Posted February 19, 2019 Honorable Member Share Posted February 19, 2019 (edited) reformatted + passable hex value as arg This is the hidden content, please Sign In or Sign Up Spoiler Edited August 25, 2022 by Metin2 Dev Core X - External 2 Internal 9 10 Check out my GitHub Link to comment Share on other sites More sharing options...
Forum Moderator VegaS™ 10275 Posted June 2, 2019 Author Forum Moderator Share Posted June 2, 2019 This is the hidden content, please Sign In or Sign Up #include "cff.h" std::string text = CFF::format("Metin2", "green"); std::string text = CFF::format(std::to_string(8000), "banana"); std::string text = CFF::format(std::to_string(412.55), "red"); std::string text = CFF::format("Pending", "#113355"); std::string text = CFF::format("Item name:", "springgreen", CFF::FLAG_NEW_TAB) + CFF::format(pItemData->GetName(), "chocolate"); std::vector<string> text = CFF::multi_format({"a", "b", "c"}, "red"); // text[0], text[1], text[2] 1 7 Check my GitHub Profile Click to find all the threads started by me [TOOL] Text file loader + JSON Link to comment Share on other sites More sharing options...
Forum Moderator VegaS™ 10275 Posted October 1, 2019 Author Forum Moderator Share Posted October 1, 2019 Updated v1.1 - Fixed limited string format Check my GitHub Profile Click to find all the threads started by me [TOOL] Text file loader + JSON Link to comment Share on other sites More sharing options...
Recommended Posts