Commit 64e3e4e3 authored by nanahira's avatar nanahira

Merge branch 'test' of https://github.com/mercury233/ygopro

parents 65d7a97c f4a94109
......@@ -977,7 +977,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->lstLog->addItem(textBuffer);
mainGame->logParam.push_back(0);
mainGame->gMutex.Lock();
mainGame->SetStaticText(mainGame->stACMessage, 310, mainGame->textFont, textBuffer);
mainGame->SetStaticText(mainGame->stACMessage, 310, mainGame->guiFont, textBuffer);
mainGame->PopupElement(mainGame->wACMessage, 20);
mainGame->gMutex.Unlock();
mainGame->WaitFrameSignal(40);
......@@ -995,7 +995,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->lstLog->addItem(textBuffer);
mainGame->logParam.push_back(0);
mainGame->gMutex.Lock();
mainGame->SetStaticText(mainGame->stACMessage, 310, mainGame->textFont, textBuffer);
mainGame->SetStaticText(mainGame->stACMessage, 310, mainGame->guiFont, textBuffer);
mainGame->PopupElement(mainGame->wACMessage, 20);
mainGame->gMutex.Unlock();
mainGame->WaitFrameSignal(40);
......@@ -1006,7 +1006,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->lstLog->addItem(textBuffer);
mainGame->logParam.push_back(0);
mainGame->gMutex.Lock();
mainGame->SetStaticText(mainGame->stACMessage, 310, mainGame->textFont, textBuffer);
mainGame->SetStaticText(mainGame->stACMessage, 310, mainGame->guiFont, textBuffer);
mainGame->PopupElement(mainGame->wACMessage, 20);
mainGame->gMutex.Unlock();
mainGame->WaitFrameSignal(40);
......@@ -1017,7 +1017,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->lstLog->addItem(textBuffer);
mainGame->logParam.push_back(data);
mainGame->gMutex.Lock();
mainGame->SetStaticText(mainGame->stACMessage, 310, mainGame->textFont, textBuffer);
mainGame->SetStaticText(mainGame->stACMessage, 310, mainGame->guiFont, textBuffer);
mainGame->PopupElement(mainGame->wACMessage, 20);
mainGame->gMutex.Unlock();
mainGame->WaitFrameSignal(40);
......@@ -1028,7 +1028,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->lstLog->addItem(textBuffer);
mainGame->logParam.push_back(0);
mainGame->gMutex.Lock();
mainGame->SetStaticText(mainGame->stACMessage, 310, mainGame->textFont, textBuffer);
mainGame->SetStaticText(mainGame->stACMessage, 310, mainGame->guiFont, textBuffer);
mainGame->PopupElement(mainGame->wACMessage, 20);
mainGame->gMutex.Unlock();
mainGame->WaitFrameSignal(40);
......
......@@ -1633,7 +1633,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
str.append(formatBuffer);
}
should_show_tip = true;
irr::core::dimension2d<unsigned int> dtip = mainGame->textFont->getDimension(str.c_str()) + irr::core::dimension2d<unsigned int>(10, 10);
irr::core::dimension2d<unsigned int> dtip = mainGame->guiFont->getDimension(str.c_str()) + irr::core::dimension2d<unsigned int>(10, 10);
mainGame->stTip->setRelativePosition(recti(mousepos.X - 10 - dtip.Width, mousepos.Y + 10, mousepos.X - 10, mousepos.Y + 10 + dtip.Height));
mainGame->stTip->setText(str.c_str());
}
......@@ -1989,15 +1989,19 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
switch(event.KeyInput.Key) {
case irr::KEY_KEY_R: {
if(mainGame->gameConf.control_mode == 0
&& !event.KeyInput.PressedDown && !mainGame->HasFocus(EGUIET_EDIT_BOX))
&& !event.KeyInput.PressedDown && !mainGame->HasFocus(EGUIET_EDIT_BOX)) {
mainGame->textFont->setTransparency(true);
mainGame->guiFont->setTransparency(true);
}
return true;
break;
}
case irr::KEY_F9: {
if(mainGame->gameConf.control_mode == 1
&& !event.KeyInput.PressedDown && !mainGame->HasFocus(EGUIET_EDIT_BOX))
&& !event.KeyInput.PressedDown && !mainGame->HasFocus(EGUIET_EDIT_BOX)) {
mainGame->textFont->setTransparency(true);
mainGame->guiFont->setTransparency(true);
}
return true;
break;
}
......
......@@ -777,7 +777,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
memcpy(msgbuf, begin, len + 1);
BufferIO::DecodeUTF8(msgbuf, msg);
mainGame->gMutex.Lock();
mainGame->SetStaticText(mainGame->stMessage, 310, mainGame->textFont, msg);
mainGame->SetStaticText(mainGame->stMessage, 310, mainGame->guiFont, msg);
mainGame->PopupElement(mainGame->wMessage);
mainGame->gMutex.Unlock();
mainGame->actionSignal.Reset();
......
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