diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-08-21 18:32:11 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-08-21 18:32:11 +0100 |
| commit | e8bb753ea7f1dfe2dac761050f47ea1cb786f01b (patch) | |
| tree | 514f2e1043e34b5e2233642d075b31fd6d1812f4 /src/xml.cc | |
| parent | 3fc1eba823a52603aa58f3df6f08dc4e73309c63 (diff) | |
Pick up subtitle color.
Diffstat (limited to 'src/xml.cc')
| -rw-r--r-- | src/xml.cc | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -189,6 +189,17 @@ XMLNode::optional_bool_attribute (string name) return optional<bool> (false); } +optional<Color> +XMLNode::optional_color_attribute (string name) +{ + string const s = string_attribute (name); + if (s.empty ()) { + return optional<Color> (); + } + + return optional<Color> (Color (s)); +} + void XMLNode::done () { |
