Commit 124ef561 authored by salix5's avatar salix5

change face-up/face-down color setting

For effects that can target banished cards of both players, the bg color
sequence GGWWGG may be confusing.
Current setting:
face-up: black text (by seeing)
face-down: blue text (by confirming)
parent 9f33aab3
......@@ -397,11 +397,18 @@ void ClientField::ShowSelectCard(bool buttonok, bool chain) {
if(selectable_cards[i]->overlayTarget->controler)
mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0);
else mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
} else if(selectable_cards[i]->location == LOCATION_EXTRA || selectable_cards[i]->location == LOCATION_REMOVED) {
if(selectable_cards[i]->position & POS_FACEDOWN)
mainGame->stCardPos[i]->setOverrideColor(0xff0000ff);
if(selectable_cards[i]->overlayTarget->controler)
mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0);
else
mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
} else {
if((selectable_cards[i]->controler)
|| ((selectable_cards[i]->location & (LOCATION_EXTRA + LOCATION_REMOVED)) && (selectable_cards[i]->position & POS_FACEDOWN)))
if(selectable_cards[i]->controler)
mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0);
else mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
else
mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
}
} else {
if(sort_list[i]) {
......@@ -519,12 +526,20 @@ void ClientField::ShowLocationCard() {
mainGame->stDisplayPos[i]->setOverrideColor(0xff0000ff);
if(display_cards[i]->overlayTarget->controler)
mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0);
else mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff);
else
mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff);
} else if(display_cards[i]->location == LOCATION_EXTRA || display_cards[i]->location == LOCATION_REMOVED) {
if(display_cards[i]->position & POS_FACEDOWN)
mainGame->stCardPos[i]->setOverrideColor(0xff0000ff);
if(display_cards[i]->overlayTarget->controler)
mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0);
else
mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
} else {
if((display_cards[i]->controler)
|| ((display_cards[i]->location & (LOCATION_EXTRA + LOCATION_REMOVED)) && (display_cards[i]->position & POS_FACEDOWN)))
if(display_cards[i]->controler)
mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0);
else mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff);
else
mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff);
}
mainGame->stDisplayPos[i]->setVisible(true);
mainGame->stDisplayPos[i]->setRelativePosition(rect<s32>(startpos + i * 125, 30, startpos + 120 + i * 125, 50));
......
......@@ -738,6 +738,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case SCROLL_CARD_SELECT: {
int pos = mainGame->scrCardList->getPos() / 10;
for(int i = 0; i < 5; ++i) {
// draw selectable_cards[i + pos] in btnCardSelect[i]
mainGame->stCardPos[i]->enableOverrideColor(false);
if(selectable_cards[i + pos]->code)
mainGame->btnCardSelect[i]->setImage(imageManager.GetTexture(selectable_cards[i + pos]->code));
......@@ -765,18 +766,29 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if(selectable_cards[i + pos]->location == LOCATION_OVERLAY) {
if(selectable_cards[i + pos]->owner != selectable_cards[i + pos]->overlayTarget->controler)
mainGame->stCardPos[i]->setOverrideColor(0xff0000ff);
// BackgroundColor: controller of the xyz monster
if(selectable_cards[i + pos]->is_selected)
mainGame->stCardPos[i]->setBackgroundColor(0xffffff00);
else if(selectable_cards[i + pos]->overlayTarget->controler)
mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0);
else mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
else
mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
} else if(selectable_cards[i + pos]->location == LOCATION_EXTRA || selectable_cards[i + pos]->location == LOCATION_REMOVED) {
if(selectable_cards[i + pos]->position & POS_FACEDOWN)
mainGame->stCardPos[i]->setOverrideColor(0xff0000ff);
if(selectable_cards[i + pos]->is_selected)
mainGame->stCardPos[i]->setBackgroundColor(0xffffff00);
else if(selectable_cards[i + pos]->controler)
mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0);
else
mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
} else {
if(selectable_cards[i + pos]->is_selected)
mainGame->stCardPos[i]->setBackgroundColor(0xffffff00);
else if((selectable_cards[i + pos]->controler)
|| ((selectable_cards[i + pos]->location & (LOCATION_EXTRA + LOCATION_REMOVED)) && (selectable_cards[i + pos]->position & POS_FACEDOWN)))
else if(selectable_cards[i + pos]->controler)
mainGame->stCardPos[i]->setBackgroundColor(0xffd0d0d0);
else mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
else
mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
}
}
break;
......@@ -784,6 +796,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case SCROLL_CARD_DISPLAY: {
int pos = mainGame->scrDisplayList->getPos() / 10;
for(int i = 0; i < 5; ++i) {
// draw display_cards[i + pos] in btnCardDisplay[i]
mainGame->stDisplayPos[i]->enableOverrideColor(false);
if(display_cards[i + pos]->code)
mainGame->btnCardDisplay[i]->setImage(imageManager.GetTexture(display_cards[i + pos]->code));
......@@ -802,14 +815,23 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
if(display_cards[i + pos]->location == LOCATION_OVERLAY) {
if(display_cards[i + pos]->owner != display_cards[i + pos]->overlayTarget->controler)
mainGame->stDisplayPos[i]->setOverrideColor(0xff0000ff);
// BackgroundColor: controller of the xyz monster
if(display_cards[i + pos]->overlayTarget->controler)
mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0);
else mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff);
else
mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff);
} else if(display_cards[i + pos]->location == LOCATION_EXTRA || display_cards[i + pos]->location == LOCATION_REMOVED) {
if(display_cards[i + pos]->position & POS_FACEDOWN)
mainGame->stDisplayPos[i]->setOverrideColor(0xff0000ff);
if(display_cards[i + pos]->controler)
mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0);
else
mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff);
} else {
if((display_cards[i + pos]->controler)
|| ((display_cards[i + pos]->location & (LOCATION_EXTRA + LOCATION_REMOVED)) && (display_cards[i + pos]->position & POS_FACEDOWN)))
if(display_cards[i + pos]->controler)
mainGame->stDisplayPos[i]->setBackgroundColor(0xffd0d0d0);
else mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff);
else
mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff);
}
}
break;
......
Subproject commit 9e7c8ca88d6ad773f299d19bc1f01f1af496a6ab
Subproject commit bdfe3d7c4db18f1b66f0cab7874108411571bff2
Subproject commit d10310ac812e85972884eaaf83f870e23c871f1c
Subproject commit 1fca242d78c10a0d5149e7f91ffa09d9143eca63
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment