mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
vcmi: actually implement AUTO for CInfoWindow
This is possible to use infobar interactions now.
This commit is contained in:
@@ -1034,11 +1034,18 @@ void CPlayerInterface::yourTacticPhase(int distance)
|
||||
void CPlayerInterface::showInfoDialog(EInfoWindowMode type, const std::string &text, const std::vector<Component> & components, int soundID)
|
||||
{
|
||||
EVENT_HANDLER_CALLED_BY_CLIENT;
|
||||
if(type == InfoWindow::INFO) {
|
||||
adventureInt->infoBar->showComponents(components, text);
|
||||
if (makingTurn && GH.listInt.size() && LOCPLINT == this)
|
||||
CCS->soundh->playSound(static_cast<soundBase::soundID>(soundID));
|
||||
return;
|
||||
|
||||
bool autoTryHover = settings["gameTweaks"]["infoBarPick"].Bool() && type == EInfoWindowMode::AUTO;
|
||||
auto timer = type == EInfoWindowMode::INFO ? 3000 : 4500; //Implement long info windows like in HD mod
|
||||
|
||||
if(autoTryHover || type == EInfoWindowMode::INFO)
|
||||
{
|
||||
if(adventureInt->infoBar->tryShowComponents(components, text, timer))
|
||||
{
|
||||
if (makingTurn && GH.listInt.size() && LOCPLINT == this)
|
||||
CCS->soundh->playSound(static_cast<soundBase::soundID>(soundID));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (settings["session"]["autoSkip"].Bool() && !GH.isKeyboardShiftDown())
|
||||
|
||||
Reference in New Issue
Block a user