diff --git a/clientgui/sg_SkinClass.cpp b/clientgui/sg_SkinClass.cpp new file mode 100644 index 0000000000..245f11930d --- /dev/null +++ b/clientgui/sg_SkinClass.cpp @@ -0,0 +1,26 @@ +#include "sg_SkinClass.h" + + +SkinClass::SkinClass() +{ +} +SkinClass* SkinClass::Instance() +{ + static SkinClass inst; + return &inst; +} +wxColour SkinClass::GetColorFromStr(wxString col){ + // create color + int delPos = col.Find(":"); + wxString rcol = col.Mid(0,delPos); + col = col.Mid(delPos+1, col.Length() - delPos); + delPos = col.Find(":"); + wxString gcol = col.Mid(0,delPos); + wxString bcol = col.Mid(delPos+1, col.Length()- delPos); + + unsigned char r_ch = atoi(rcol.c_str()); + unsigned char g_ch = atoi(gcol.c_str()); + unsigned char b_ch = atoi(bcol.c_str()); + + return wxColour(r_ch,g_ch,b_ch); +}