Added Right Click to time compression to fast forward a single hour

This commit is contained in:
Buscher
2025-08-24 15:06:10 -03:00
committed by majcosta
parent 3c44f133fd
commit 1004ab6c8c
5 changed files with 36 additions and 1 deletions
+21
View File
@@ -713,6 +713,27 @@ void BtnTimeCompressMoreMapScreenCallback( GUI_BUTTON *btn,INT32 reason )
{
if ( CommonTimeCompressionChecks() == TRUE )
return;
// redraw region
if( btn->uiFlags & MSYS_HAS_BACKRECT )
{
fMapScreenBottomDirty = TRUE;
}
btn->uiFlags|=(BUTTON_CLICKED_ON);
}
// Start time compression which stops at the next hour
// Button down removes the pop up/tooltip, Button up calls the functionality
else if(reason & MSYS_CALLBACK_REASON_RBUTTON_UP )
{
if (btn->uiFlags & BUTTON_CLICKED_ON)
{
btn->uiFlags&=~(BUTTON_CLICKED_ON);
fMapScreenBottomDirty = TRUE;
stopTimeCompressionNextHour = true;
SetGameTimeCompressionLevel( TIME_COMPRESS_60MINS );
}
}
}