[-] Fixed another issue with player colors

This commit is contained in:
cybermind 2014-06-08 20:01:44 +06:00
parent 2a3bfff15f
commit df3f239226
2 changed files with 6 additions and 2 deletions

View file

@ -727,7 +727,7 @@ static void DrawEditorPanel_SelectIcon()
unsigned int flag = (ButtonUnderCursor == SelectButton ? IconActive : 0)
| (Editor.State == EditorSelecting ? IconSelected : 0);
// FIXME: wrong button style
icon->DrawUnitIcon(*UI.SingleSelectedButton->Style, flag, pos, "");
icon->DrawUnitIcon(*UI.SingleSelectedButton->Style, flag, pos, "", Editor.SelectedPlayer);
}
static void DrawEditorPanel_UnitsIcon()

View file

@ -790,9 +790,13 @@ void CButtonPanel::Draw()
} else if (gray) {
buttons[i].Icon.Icon->DrawGrayscaleIcon(pos);
} else {
int player = -1;
if (Selected.empty() == false && Selected[0]->IsAlive()) {
player = Selected[0]->Player->Index;
}
buttons[i].Icon.Icon->DrawUnitIcon(*UI.ButtonPanel.Buttons[i].Style,
GetButtonStatus(buttons[i], ButtonUnderCursor),
pos, buf);
pos, buf, player);
}
}
//