mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	| @@ -296,11 +296,14 @@ void CHighlightableButton::clickLeft(tribool down, bool previousState) | ||||
| { | ||||
| 	if(blocked) | ||||
| 		return; | ||||
| 	if (down) { | ||||
| 	if (down)  | ||||
| 	{ | ||||
| 		CGI->soundh->playSound(soundBase::button); | ||||
| 		state = 1; | ||||
| 	} else | ||||
| 	}  | ||||
| 	else | ||||
| 		state = selected ? 3 : 0; | ||||
|  | ||||
| 	show(screenBuf); | ||||
| 	if(previousState  &&  down == false) | ||||
| 	{ | ||||
| @@ -336,6 +339,7 @@ CHighlightableButton::CHighlightableButton( const std::string &Name, const std:: | ||||
| void CHighlightableButtonsGroup::addButton(CHighlightableButton* bt) | ||||
| { | ||||
| 	bt->callback += boost::bind(&CHighlightableButtonsGroup::selectionChanged,this,bt->ID); | ||||
| 	bt->onlyOn = true; | ||||
| 	buttons.push_back(bt); | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -495,6 +495,7 @@ static void listenForEvents() | ||||
| 			delete ev; | ||||
|  | ||||
| 			GH.curInt = CGP; | ||||
| 			GH.defActionsDef = 63; | ||||
| 			continue; | ||||
| 		} | ||||
|  | ||||
|   | ||||
| @@ -401,16 +401,17 @@ void CSelectionScreen::toggleTab(CIntObject *tab) | ||||
| void CSelectionScreen::changeSelection( const CMapInfo *to ) | ||||
| { | ||||
| 	curMap = current = to;; | ||||
|  | ||||
| 	if(to && type == CMenuScreen::loadGame) | ||||
| 		curOpts->difficulty = to->scenarioOpts->difficulty; | ||||
| 	if(type != CMenuScreen::campaignList) | ||||
| 	{ | ||||
| 		updateStartInfo(to, sInfo, to->mapHeader); | ||||
| 		updateStartInfo(to, sInfo, to ? to->mapHeader : NULL); | ||||
| 	} | ||||
| 	card->changeSelection(to); | ||||
| 	if(type != CMenuScreen::campaignList) | ||||
| 	{ | ||||
| 		opt->changeSelection(to->mapHeader); | ||||
| 		opt->changeSelection(to ? to->mapHeader : NULL); | ||||
| 	} | ||||
| } | ||||
|  | ||||
| @@ -1516,7 +1517,7 @@ void OptionsTab::changeSelection( const CMapHeader *to ) | ||||
| 	entries.clear(); | ||||
| 	usedHeroes.clear(); | ||||
|  | ||||
| 	OBJ_CONSTRUCTION; | ||||
| 	OBJ_CONSTRUCTION_CAPTURING_ALL; | ||||
| 	for(int i = 0; i < curOpts->playerInfos.size(); i++) | ||||
| 	{ | ||||
| 		entries.push_back(new PlayerOptionsEntry(this, curOpts->playerInfos[i])); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user