Make AssColor::Parse() also understand HTML colours with a bit of help from wx.

Originally committed to SVN as r2910.
This commit is contained in:
Niels Martin Hansen 2009-05-12 15:14:35 +00:00
parent d56982ed4a
commit 54037c56e7
1 changed files with 6 additions and 0 deletions

View File

@ -58,6 +58,12 @@ AssColor::AssColor (wxColour &color) {
//////////////////
// Parse from SSA/ASS
void AssColor::Parse(const wxString value) {
if (value.Len() > 0 && value[0] == _T('#')) {
// HTML colour
SetWXColor(wxColor(value));
return;
}
// Prepare
char c,ostr[12];
unsigned long outval;