Moved the AColor type to a gfx/ header, so other code can use it.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@847 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-05-16 19:49:14 +00:00
parent 36c7e3ef43
commit d70c3d6d74
11 changed files with 118 additions and 81 deletions
-13
View File
@@ -367,19 +367,6 @@ template <> void Reader::handle(Vector2D& vec) {
}
}
template <> void Reader::handle(Color& col) {
col = parse_color(getValue());
if (!col.Ok()) col = *wxBLACK;
}
Color parse_color(const String& v) {
UInt r,g,b;
if (wxSscanf(v.c_str(),_("rgb(%u,%u,%u)"),&r,&g,&b)) {
return Color(r, g, b);
} else {
return Color(v);
}
}
template <> void Reader::handle(FileName& f) {
if (clipboard_package()) {
String str = getValue();