mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	* working info about collecting resources in infoBar
* minor fixes
This commit is contained in:
		| @@ -1283,6 +1283,15 @@ void CInfoBar::newDay(int Day) | ||||
|  | ||||
| void CInfoBar::showComp(SComponent * comp, int time) | ||||
| { | ||||
| 	SDL_Surface * b = CGI->bitmaph->loadBitmap("ADSTATOT.bmp"); | ||||
| 	blitAt(b,pos.x+8,pos.y+11); | ||||
| 	blitAt(comp->getImg(),pos.x+52,pos.y+54); | ||||
| 	printAtMiddle(comp->subtitle,pos.x+91,pos.y+158,GEOR13,zwykly); | ||||
| 	printAtMiddleWB(comp->description,pos.x+94,pos.y+31,GEOR13,26,zwykly); | ||||
| 	SDL_FreeSurface(b); | ||||
| 	TimeInterested::activate(); | ||||
| 	mode = 6; | ||||
| 	toNextTick = time; | ||||
| } | ||||
|  | ||||
| void CInfoBar::tick() | ||||
| @@ -1301,6 +1310,13 @@ void CInfoBar::tick() | ||||
| 		toNextTick = 150; | ||||
| 		blitAnim(mode); | ||||
| 	} | ||||
| 	else if (mode == 6) | ||||
| 	{ | ||||
| 		TimeInterested::deactivate(); | ||||
| 		toNextTick = -1; | ||||
| 		mode = 5; | ||||
| 		draw(); | ||||
| 	} | ||||
|  | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -1450,7 +1450,7 @@ void CPlayerInterface::receivedResource(int type, int val) | ||||
|  | ||||
| void CPlayerInterface::showComp(SComponent comp) | ||||
| { | ||||
|  | ||||
| 	adventureInt->infoBar.showComp(&comp,4000); | ||||
| } | ||||
|  | ||||
| void CPlayerInterface::showInfoDialog(std::string text, std::vector<SComponent*> & components) | ||||
|   | ||||
| @@ -75,7 +75,7 @@ void CSDL_Ext::printAtMiddleWB(std::string text, int x, int y, TTF_Font * font, | ||||
| 	for (int i=0;i<wesu.size();i++) | ||||
| 	{ | ||||
| 		evx = (x - (tox/2)) + ((tox-wesu[i]->w)/2); | ||||
| 		blitAt(wesu[i],evx,evy); | ||||
| 		blitAt(wesu[i],evx,evy,dst); | ||||
| 		evy+=wesu[i]->h; | ||||
| 	} | ||||
|  | ||||
|   | ||||
| @@ -29,7 +29,8 @@ void CObjectHandler::loadObjects() | ||||
| 	while (it<buf.length()-1) | ||||
| 	{ | ||||
| 		CGeneralTextHandler::loadToIt(temp,buf,it,3); | ||||
| 		temp = temp.substr(1,temp.length()-2); | ||||
| 		if (temp[0]=='\"') | ||||
| 			temp = temp.substr(1,temp.length()-2); | ||||
| 		boost::algorithm::replace_all(temp,"\"\"","\""); | ||||
| 		advobtxt.push_back(temp); | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user