From e8bb753ea7f1dfe2dac761050f47ea1cb786f01b Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 21 Aug 2012 18:32:11 +0100 Subject: Pick up subtitle color. --- src/xml.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/xml.cc') diff --git a/src/xml.cc b/src/xml.cc index bc42ebce..1d524738 100644 --- a/src/xml.cc +++ b/src/xml.cc @@ -189,6 +189,17 @@ XMLNode::optional_bool_attribute (string name) return optional (false); } +optional +XMLNode::optional_color_attribute (string name) +{ + string const s = string_attribute (name); + if (s.empty ()) { + return optional (); + } + + return optional (Color (s)); +} + void XMLNode::done () { -- cgit v1.2.3