Example #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");
}
Example #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;
		}
	}
}
Example #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);
}
Example #4
0
void ClientObjectType::addTransformImage(const std::string &filename) {
  _transformImages.push_back(ImageSet("Images/Objects/" + filename + ".png"));
}