fix: non-uniform selection
shows attack as empty position
This commit is contained in:
parent
1c1dd0a393
commit
d3c19ce9a5
|
@ -1028,13 +1028,12 @@ void Gui::computeDisplay(){
|
||||||
//non uniform selection
|
//non uniform selection
|
||||||
int basicPos = CommandHelper::getRowPos(crBasics);
|
int basicPos = CommandHelper::getRowPos(crBasics);
|
||||||
|
|
||||||
// First row is always empty
|
// Cores row is always empty
|
||||||
for (int i = 0; i < 5; i++)
|
for (int i = CommandHelper::getRowPos(crCores); i < basicPos; i++)
|
||||||
emptyPosIndexes.push_back(i);
|
emptyPosIndexes.push_back(i);
|
||||||
|
|
||||||
// only basics can be shared
|
// only basics can be shared
|
||||||
for(auto &&cc : CommandHelper::getBasicsCC()){
|
for(auto &&cc : CommandHelper::getBasicsCC()){
|
||||||
|
|
||||||
//printf("computeDisplay i = %d cc = %d isshared = %d basicPos = %d\n",i,cc,isSharedCommandClass(cc),basicPos);
|
//printf("computeDisplay i = %d cc = %d isshared = %d basicPos = %d\n",i,cc,isSharedCommandClass(cc),basicPos);
|
||||||
|
|
||||||
const Unit* attackingUnit = NULL;
|
const Unit* attackingUnit = NULL;
|
||||||
|
@ -1044,7 +1043,7 @@ void Gui::computeDisplay(){
|
||||||
|
|
||||||
auto ccPos = CommandHelper::getBasicPos(cc);
|
auto ccPos = CommandHelper::getBasicPos(cc);
|
||||||
|
|
||||||
if((cc == ccAttack && attackingUnit != NULL) || (isSharedCommandClass(cc) && cc != ccBuild)){
|
if((cc == ccAttack && attackingUnit != NULL) || isSharedCommandClass(cc)) {
|
||||||
display.setDownLighted(basicPos + ccPos, true);
|
display.setDownLighted(basicPos + ccPos, true);
|
||||||
|
|
||||||
if (cc == ccAttack && attackingUnit != NULL) {
|
if (cc == ccAttack && attackingUnit != NULL) {
|
||||||
|
|
Loading…
Reference in New Issue