Commit 85f83185 authored by VanillaSalt's avatar VanillaSalt

update

parent efe19f1c
......@@ -446,9 +446,7 @@ void ClientField::ShowSelectCard(bool buttonok, bool chain) {
mainGame->scrCardList->setMax((selectable_cards.size() - 5) * 10 + 9);
mainGame->scrCardList->setPos(0);
}
if(buttonok)
mainGame->btnSelectOK->setVisible(true);
else mainGame->btnSelectOK->setVisible(false);
mainGame->btnSelectOK->setVisible(buttonok);
mainGame->PopupElement(mainGame->wCardSelect);
}
void ClientField::ShowChainCard() {
......
......@@ -1160,7 +1160,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
int c, l, s, ss;
unsigned int code;
bool panelmode = false;
mainGame->dField.select_ready = false;
bool select_ready = mainGame->dField.select_min == 0;
mainGame->dField.select_ready = select_ready;
ClientCard* pcard;
for (int i = 0; i < count; ++i) {
code = (unsigned int)BufferIO::ReadInt32(pbuf);
......@@ -1190,7 +1191,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
if (panelmode) {
mainGame->gMutex.Lock();
mainGame->wCardSelect->setText(textBuffer);
mainGame->dField.ShowSelectCard();
mainGame->dField.ShowSelectCard(select_ready);
mainGame->gMutex.Unlock();
} else {
mainGame->stHintMsg->setText(textBuffer);
......@@ -1198,6 +1199,8 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
}
if (mainGame->dField.select_cancelable) {
mainGame->dField.ShowCancelOrFinishButton(1);
} else if (select_ready) {
mainGame->dField.ShowCancelOrFinishButton(2);
} else {
mainGame->dField.ShowCancelOrFinishButton(0);
}
......
......@@ -29,7 +29,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
case BUTTON_HAND2:
case BUTTON_HAND3: {
mainGame->wHand->setVisible(false);
if(mainGame->dInfo.curMsg == MSG_ROCK_PAPER_SCISSORS){
if(mainGame->dInfo.curMsg == MSG_ROCK_PAPER_SCISSORS) {
DuelClient::SetResponseI(id - BUTTON_HAND1 + 1);
DuelClient::SendResponse();
} else {
......@@ -204,7 +204,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
else
DuelClient::SendResponse();
}
break;
}
if (mainGame->wQuery->isVisible()) {
SetResponseSelectedCards();
......@@ -1566,7 +1565,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
else
DuelClient::SendResponse();
}
break;
}
if(mainGame->wQuery->isVisible()) {
SetResponseSelectedCards();
......
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