mirror of
https://github.com/glest/glest-source.git
synced 2025-08-28 10:19:55 +02:00
- 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:
@@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -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;
|
||||||
|
Reference in New Issue
Block a user