+ v2s32 pos = basepos;
+ pos.X += stof(f.next_esc(",")) * (float)spacing.X;
+ pos.Y += stof(f.next_esc(";")) * (float)spacing.Y;
+ v2s32 geom;
+ geom.X = stof(f.next_esc(",")) * (float)imgsize.X;
+ geom.Y = stof(f.next_esc(";")) * (float)imgsize.Y;
+ std::string name = f.next_esc("]");
+ infostream<<"item name="<<name
+ <<", pos=("<<pos.X<<","<<pos.Y<<")"
+ <<", geom=("<<geom.X<<","<<geom.Y<<")"
+ <<std::endl;
+ if(bp_set != 2)
+ errorstream<<"WARNING: invalid use of item_image without a size[] element"<<std::endl;
+ m_itemimages.push_back(ImageDrawSpec(name, pos, geom));
+ }
+ else if(type == "background")
+ {
+ v2s32 pos = basepos;
+ pos.X += stof(f.next_esc(",")) * (float)spacing.X - ((float)spacing.X-(float)imgsize.X)/2;
+ pos.Y += stof(f.next_esc(";")) * (float)spacing.Y - ((float)spacing.Y-(float)imgsize.Y)/2;
+ v2s32 geom;
+ geom.X = stof(f.next_esc(",")) * (float)spacing.X;
+ geom.Y = stof(f.next_esc(";")) * (float)spacing.Y;
+ std::string name = f.next_esc("]");
+ infostream<<"image name="<<name
+ <<", pos=("<<pos.X<<","<<pos.Y<<")"
+ <<", geom=("<<geom.X<<","<<geom.Y<<")"
+ <<std::endl;
+ if(bp_set != 2)
+ errorstream<<"WARNING: invalid use of background without a size[] element"<<std::endl;
+ m_backgrounds.push_back(ImageDrawSpec(name, pos, geom));
+ }
+ else if(type == "field" || type == "textarea")
+ {
+ std::string fname = f.next_esc(";");
+ std::string flabel = f.next_esc(";");
+