Chaning of the queuing key is easier
This commit is contained in:
parent
e06e964728
commit
54db1e20f6
|
@ -43,6 +43,8 @@ namespace Glest{ namespace Game{
|
||||||
|
|
||||||
const float Mouse3d::fadeSpeed= 1.f/50.f;
|
const float Mouse3d::fadeSpeed= 1.f/50.f;
|
||||||
|
|
||||||
|
static const int queueCommandKey = vkShift;
|
||||||
|
|
||||||
Mouse3d::Mouse3d(){
|
Mouse3d::Mouse3d(){
|
||||||
enabled= false;
|
enabled= false;
|
||||||
rot= 0;
|
rot= 0;
|
||||||
|
@ -371,12 +373,12 @@ void Gui::onSelectionChanged(){
|
||||||
|
|
||||||
void Gui::giveOneClickOrders(){
|
void Gui::giveOneClickOrders(){
|
||||||
CommandResult result;
|
CommandResult result;
|
||||||
bool shiftDown = isKeyDown(vkShift);
|
bool queueKeyDown = isKeyDown(queueCommandKey);
|
||||||
if(selection.isUniform()){
|
if(selection.isUniform()){
|
||||||
result= commander->tryGiveCommand(&selection, activeCommandType, Vec2i(0), (Unit*)NULL, shiftDown);
|
result= commander->tryGiveCommand(&selection, activeCommandType, Vec2i(0), (Unit*)NULL, queueKeyDown);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
result= commander->tryGiveCommand(&selection, activeCommandClass, Vec2i(0), (Unit*)NULL, shiftDown);
|
result= commander->tryGiveCommand(&selection, activeCommandClass, Vec2i(0), (Unit*)NULL, queueKeyDown);
|
||||||
}
|
}
|
||||||
addOrdersResultToConsole(activeCommandClass, result);
|
addOrdersResultToConsole(activeCommandClass, result);
|
||||||
activeCommandType= NULL;
|
activeCommandType= NULL;
|
||||||
|
@ -393,9 +395,9 @@ void Gui::giveDefaultOrders(int x, int y){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool shiftDown = isKeyDown(vkShift);
|
bool queueKeyDown = isKeyDown(queueCommandKey);
|
||||||
//give order
|
//give order
|
||||||
CommandResult result= commander->tryGiveCommand(&selection, targetPos, targetUnit, shiftDown);
|
CommandResult result= commander->tryGiveCommand(&selection, targetPos, targetUnit, queueKeyDown);
|
||||||
|
|
||||||
//graphical result
|
//graphical result
|
||||||
addOrdersResultToConsole(activeCommandClass, result);
|
addOrdersResultToConsole(activeCommandClass, result);
|
||||||
|
@ -426,20 +428,20 @@ void Gui::giveTwoClickOrders(int x, int y){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool shiftDown = isKeyDown(vkShift);
|
bool queueKeyDown = isKeyDown(queueCommandKey);
|
||||||
//give orders to the units of this faction
|
//give orders to the units of this faction
|
||||||
if(!selectingBuilding){
|
if(!selectingBuilding){
|
||||||
if(selection.isUniform()){
|
if(selection.isUniform()){
|
||||||
result= commander->tryGiveCommand(&selection, activeCommandType, targetPos, targetUnit,shiftDown);
|
result= commander->tryGiveCommand(&selection, activeCommandType, targetPos, targetUnit,queueKeyDown);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
result= commander->tryGiveCommand(&selection, activeCommandClass, targetPos, targetUnit,shiftDown);
|
result= commander->tryGiveCommand(&selection, activeCommandClass, targetPos, targetUnit,queueKeyDown);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
//selecting building
|
//selecting building
|
||||||
result= commander->tryGiveCommand(selection.getFrontUnit(),
|
result= commander->tryGiveCommand(selection.getFrontUnit(),
|
||||||
activeCommandType, posObjWorld, choosenBuildingType, selectedBuildingFacing,shiftDown);
|
activeCommandType, posObjWorld, choosenBuildingType, selectedBuildingFacing,queueKeyDown);
|
||||||
}
|
}
|
||||||
|
|
||||||
//graphical result
|
//graphical result
|
||||||
|
|
Loading…
Reference in New Issue
Block a user