示例#1
0
void ClientObjectType::addMaterial(const ClientItem *item, size_t qty) {
  _materials.set(item, qty);
  auto isConstructionImageAlreadyInitialized = bool{_constructionImage.normal};
  if (!isConstructionImageAlreadyInitialized)
    _constructionImage =
        ImageSet("Images/Objects/" + _imageFile + "-construction.png");
}
示例#2
0
void IconDes::Smoothen()
{
	WithColorizeLayout<TopWindow> dlg;
	CtrlLayoutOKCancel(dlg, "Smoothen");
	PlaceDlg(dlg);
	dlg.level.MinMax(0, 1);
	dlg.level <<= 0.75;
	dlg.level <<= dlg.Breaker();
	Image bk = ImageStart();
	for(;;) {
		ImageSet(Upp::Smoothen(bk, 0.4 * minmax((double)~dlg.level + 0.01, 0.01, 1.1)));
		switch(dlg.Run()) {
		case IDCANCEL:
			ImageSet(bk);
			return;
		case IDOK:
			return;
		}
	}
}
示例#3
0
void add(list<ImageSet> &aSets, const cElFilename &aFilename)
{
	ImageSet::Info info(aFilename);
	list<ImageSet>::iterator it = aSets.begin();
	while (it != aSets.end() && it->mInfo != info) it++;

	if (it == aSets.end())
	{
		aSets.push_back(ImageSet(info));
		it = --aSets.rbegin().base();
	}

	it->mFilenames.push_back(aFilename);
}
示例#4
0
void ClientObjectType::addTransformImage(const std::string &filename) {
  _transformImages.push_back(ImageSet("Images/Objects/" + filename + ".png"));
}