mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Added Right Click to time compression to fast forward a single hour
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user