- exclusive feature for Coldfusionstorm! Press the group key a second time within 1.5 seconds and the camera centers on the group

This commit is contained in:
Mark Vejvoda 2011-06-09 22:37:37 +00:00
parent 6b14c21446
commit d668550942
2 changed files with 9 additions and 1 deletions

View File

@ -311,7 +311,13 @@ void Gui::groupKey(int groupIndex) {
else{ else{
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] groupIndex = %d\n",__FILE__,__FUNCTION__,__LINE__,groupIndex); if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] groupIndex = %d\n",__FILE__,__FUNCTION__,__LINE__,groupIndex);
selection.recallGroup(groupIndex); if(lastGroupRecallTime.getMillis() > 0 && lastGroupRecallTime.getMillis() <= 1500) {
centerCameraOnSelection();
}
else {
selection.recallGroup(groupIndex);
}
lastGroupRecallTime.start();
} }
} }

View File

@ -21,6 +21,7 @@
#include "randomgen.h" #include "randomgen.h"
#include <map> #include <map>
#include "object.h" #include "object.h"
#include "platform_common.h"
#include "leak_dumper.h" #include "leak_dumper.h"
using Shared::Util::RandomGen; using Shared::Util::RandomGen;
@ -131,6 +132,7 @@ private:
int selectionCalculationFrameSkip; int selectionCalculationFrameSkip;
int minQuadSize; int minQuadSize;
Chrono lastGroupRecallTime;
//states //states
bool selectingBuilding; bool selectingBuilding;
bool selectingPos; bool selectingPos;