mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Fix keyboard shortcuts on selection dialogs
This commit is contained in:
		| @@ -90,6 +90,15 @@ CSelWindow::CSelWindow(const std::string &Text, PlayerColor player, int charperl | ||||
| 		//buttons.back()->addCallback(std::bind(&CCallback::selectionMade, LOCPLINT->cb.get(), 0, askID)); | ||||
| 	} | ||||
|  | ||||
| 	if(buttons.size() == 1) | ||||
| 		buttons.front()->assignedKey = EShortcut::GLOBAL_RETURN; | ||||
|  | ||||
| 	if(buttons.size() == 2) | ||||
| 	{ | ||||
| 		buttons.front()->assignedKey = EShortcut::GLOBAL_ACCEPT; | ||||
| 		buttons.back()->assignedKey = EShortcut::GLOBAL_CANCEL; | ||||
| 	} | ||||
|  | ||||
| 	for(int i=0;i<comps.size();i++) | ||||
| 	{ | ||||
| 		comps[i]->recActions = 255-DISPOSE; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user