From 54037c56e79eea86819f6229178597ea42356384 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Tue, 12 May 2009 15:14:35 +0000 Subject: [PATCH] Make AssColor::Parse() also understand HTML colours with a bit of help from wx. Originally committed to SVN as r2910. --- aegisub/src/ass_style.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/aegisub/src/ass_style.cpp b/aegisub/src/ass_style.cpp index 68d4980d4..bdec3b7f7 100644 --- a/aegisub/src/ass_style.cpp +++ b/aegisub/src/ass_style.cpp @@ -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;