Commit 85f83185 authored by VanillaSalt's avatar VanillaSalt

update

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