Commit 57bd9763 authored by mercury233's avatar mercury233

fix

parent 22d6809d
...@@ -931,7 +931,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -931,7 +931,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->lstLog->addItem(textBuffer); mainGame->lstLog->addItem(textBuffer);
mainGame->logParam.push_back(0); mainGame->logParam.push_back(0);
mainGame->gMutex.Lock(); 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->PopupElement(mainGame->wACMessage, 20);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
mainGame->WaitFrameSignal(40); mainGame->WaitFrameSignal(40);
...@@ -949,7 +949,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -949,7 +949,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->lstLog->addItem(textBuffer); mainGame->lstLog->addItem(textBuffer);
mainGame->logParam.push_back(0); mainGame->logParam.push_back(0);
mainGame->gMutex.Lock(); 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->PopupElement(mainGame->wACMessage, 20);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
mainGame->WaitFrameSignal(40); mainGame->WaitFrameSignal(40);
...@@ -960,7 +960,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -960,7 +960,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->lstLog->addItem(textBuffer); mainGame->lstLog->addItem(textBuffer);
mainGame->logParam.push_back(0); mainGame->logParam.push_back(0);
mainGame->gMutex.Lock(); 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->PopupElement(mainGame->wACMessage, 20);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
mainGame->WaitFrameSignal(40); mainGame->WaitFrameSignal(40);
...@@ -971,7 +971,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -971,7 +971,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->lstLog->addItem(textBuffer); mainGame->lstLog->addItem(textBuffer);
mainGame->logParam.push_back(data); mainGame->logParam.push_back(data);
mainGame->gMutex.Lock(); 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->PopupElement(mainGame->wACMessage, 20);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
mainGame->WaitFrameSignal(40); mainGame->WaitFrameSignal(40);
...@@ -982,7 +982,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) { ...@@ -982,7 +982,7 @@ int DuelClient::ClientAnalyze(char * msg, unsigned int len) {
mainGame->lstLog->addItem(textBuffer); mainGame->lstLog->addItem(textBuffer);
mainGame->logParam.push_back(0); mainGame->logParam.push_back(0);
mainGame->gMutex.Lock(); 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->PopupElement(mainGame->wACMessage, 20);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
mainGame->WaitFrameSignal(40); mainGame->WaitFrameSignal(40);
......
...@@ -1615,7 +1615,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -1615,7 +1615,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
str.append(formatBuffer); str.append(formatBuffer);
} }
should_show_tip = true; 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->setRelativePosition(recti(mousepos.X - 10 - dtip.Width, mousepos.Y + 10, mousepos.X - 10, mousepos.Y + 10 + dtip.Height));
mainGame->stTip->setText(str.c_str()); mainGame->stTip->setText(str.c_str());
} }
...@@ -1929,15 +1929,19 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) { ...@@ -1929,15 +1929,19 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
switch(event.KeyInput.Key) { switch(event.KeyInput.Key) {
case irr::KEY_KEY_R: { case irr::KEY_KEY_R: {
if(mainGame->gameConf.control_mode == 0 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->textFont->setTransparency(true);
mainGame->guiFont->setTransparency(true);
}
return true; return true;
break; break;
} }
case irr::KEY_F9: { case irr::KEY_F9: {
if(mainGame->gameConf.control_mode == 1 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->textFont->setTransparency(true);
mainGame->guiFont->setTransparency(true);
}
return true; return true;
break; break;
} }
......
...@@ -762,7 +762,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) { ...@@ -762,7 +762,7 @@ bool SingleMode::SinglePlayAnalyze(char* msg, unsigned int len) {
memcpy(msgbuf, begin, len + 1); memcpy(msgbuf, begin, len + 1);
BufferIO::DecodeUTF8(msgbuf, msg); BufferIO::DecodeUTF8(msgbuf, msg);
mainGame->gMutex.Lock(); mainGame->gMutex.Lock();
mainGame->SetStaticText(mainGame->stMessage, 310, mainGame->textFont, msg); mainGame->SetStaticText(mainGame->stMessage, 310, mainGame->guiFont, msg);
mainGame->PopupElement(mainGame->wMessage); mainGame->PopupElement(mainGame->wMessage);
mainGame->gMutex.Unlock(); mainGame->gMutex.Unlock();
mainGame->actionSignal.Reset(); 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