+void Interpreter::ReadGauge(Gauge &g, const PropertyList &props) {
+ for (PropertyList::ConstIterator i(props.Begin()), end(props.End()); i != end; ++i) {
+ if (i->first == "image") {
+ g.SetSurface(GetImage(*i->second));
+ } else if (i->first == "full") {
+ g.SetFullOffset(GetVector(*i->second));
+ } else if (i->first == "empty") {
+ g.SetEmptyOffset(GetVector(*i->second));
+ } else if (i->first == "height") {
+ g.SetHeight(GetNumber(*i->second));
+ } else if (i->first == "start") {
+ g.SetStartWidth(GetNumber(*i->second));
+ } else if (i->first == "repeat") {
+ g.SetRepeatWidth(GetNumber(*i->second));
+ } else if (i->first == "end") {
+ g.SetEndWidth(GetNumber(*i->second));
+ } else {
+ throw Error("unknown Gauge property: " + i->first);
+ }
+ }
+}
+