mirror of
https://github.com/glest/glest-source.git
synced 2025-08-22 16:02:50 +02:00
- bugfix for group key camera movement (respect different group keys being pressed)
This commit is contained in:
@@ -96,6 +96,7 @@ void SelectionQuad::disable(){
|
|||||||
Gui::Gui(){
|
Gui::Gui(){
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s] START\n",__FILE__,__FUNCTION__);
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s] START\n",__FILE__,__FUNCTION__);
|
||||||
|
|
||||||
|
lastGroupRecall = -1;
|
||||||
posObjWorld= Vec2i(54, 14);
|
posObjWorld= Vec2i(54, 14);
|
||||||
validPosObjWorld= false;
|
validPosObjWorld= false;
|
||||||
activeCommandType= NULL;
|
activeCommandType= NULL;
|
||||||
@@ -313,13 +314,16 @@ void Gui::groupKey(int groupIndex) {
|
|||||||
|
|
||||||
Config &config = Config::getInstance();
|
Config &config = Config::getInstance();
|
||||||
int recallGroupCenterCameraTimeout = config.getInt("RecallGroupCenterCameraTimeoutMilliseconds","1500");
|
int recallGroupCenterCameraTimeout = config.getInt("RecallGroupCenterCameraTimeoutMilliseconds","1500");
|
||||||
if(lastGroupRecallTime.getMillis() > 0 && lastGroupRecallTime.getMillis() <= recallGroupCenterCameraTimeout) {
|
if(lastGroupRecall == groupIndex &&
|
||||||
|
lastGroupRecallTime.getMillis() > 0 &&
|
||||||
|
lastGroupRecallTime.getMillis() <= recallGroupCenterCameraTimeout) {
|
||||||
centerCameraOnSelection();
|
centerCameraOnSelection();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
selection.recallGroup(groupIndex);
|
selection.recallGroup(groupIndex);
|
||||||
}
|
}
|
||||||
lastGroupRecallTime.start();
|
lastGroupRecallTime.start();
|
||||||
|
lastGroupRecall = groupIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -133,6 +133,8 @@ private:
|
|||||||
int minQuadSize;
|
int minQuadSize;
|
||||||
|
|
||||||
Chrono lastGroupRecallTime;
|
Chrono lastGroupRecallTime;
|
||||||
|
int lastGroupRecall;
|
||||||
|
|
||||||
//states
|
//states
|
||||||
bool selectingBuilding;
|
bool selectingBuilding;
|
||||||
bool selectingPos;
|
bool selectingPos;
|
||||||
|
Reference in New Issue
Block a user