Commit 30a9eb56 authored by mercury233's avatar mercury233

Merge branch 'resize' into test

parents 95f68d20 0169960a
...@@ -1835,7 +1835,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) { ...@@ -1835,7 +1835,7 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
break; break;
} }
u32 pos = mainGame->scrCardText->getPos(); u32 pos = mainGame->scrCardText->getPos();
mainGame->SetStaticText(mainGame->stText, mainGame->stText->getRelativePosition().getWidth() - 25, mainGame->textFont, mainGame->showingtext, pos); mainGame->SetStaticText(mainGame->stText, mainGame->stText->getRelativePosition().getWidth() - 25, mainGame->guiFont, mainGame->showingtext, pos);
return true; return true;
break; break;
} }
......
...@@ -1273,7 +1273,7 @@ void Game::ShowCardInfo(int code, bool resize) { ...@@ -1273,7 +1273,7 @@ void Game::ShowCardInfo(int code, bool resize) {
sc = aptr->second.setcode; sc = aptr->second.setcode;
} }
if(sc) { if(sc) {
offset = 23 * yScale; offset = 23;// *yScale;
myswprintf(formatBuffer, L"%ls%ls", dataManager.GetSysString(1329), dataManager.FormatSetName(sc)); myswprintf(formatBuffer, L"%ls%ls", dataManager.GetSysString(1329), dataManager.FormatSetName(sc));
stSetName->setText(formatBuffer); stSetName->setText(formatBuffer);
} else } else
...@@ -1314,15 +1314,19 @@ void Game::ShowCardInfo(int code, bool resize) { ...@@ -1314,15 +1314,19 @@ void Game::ShowCardInfo(int code, bool resize) {
wcscat(formatBuffer, scaleBuffer); wcscat(formatBuffer, scaleBuffer);
} }
stDataInfo->setText(formatBuffer); stDataInfo->setText(formatBuffer);
stSetName->setRelativePosition(rect<s32>(15, 83 * yScale, 296 * xScale, 83 * yScale + offset)); //stSetName->setRelativePosition(rect<s32>(15, 83 * yScale, 296 * xScale, 83 * yScale + offset));
stText->setRelativePosition(rect<s32>(15, 83 * yScale + offset, 287 * xScale, 324 * yScale)); //stText->setRelativePosition(rect<s32>(15, 83 * yScale + offset, 287 * xScale, 324 * yScale));
stSetName->setRelativePosition(rect<s32>(15, 83, 296 * xScale, 83 + offset));
stText->setRelativePosition(rect<s32>(15, 83 + offset, 287 * xScale, 324 * yScale));
scrCardText->setRelativePosition(rect<s32>(287 * xScale - 20, 83 + offset, 287 * xScale, 324 * yScale)); scrCardText->setRelativePosition(rect<s32>(287 * xScale - 20, 83 + offset, 287 * xScale, 324 * yScale));
} else { } else {
myswprintf(formatBuffer, L"[%ls]", dataManager.FormatType(cd.type)); myswprintf(formatBuffer, L"[%ls]", dataManager.FormatType(cd.type));
stInfo->setText(formatBuffer); stInfo->setText(formatBuffer);
stDataInfo->setText(L""); stDataInfo->setText(L"");
stSetName->setRelativePosition(rect<s32>(15, 60 * yScale, 296 * xScale, 60 * yScale + offset)); //stSetName->setRelativePosition(rect<s32>(15, 60 * yScale, 296 * xScale, 60 * yScale + offset));
stText->setRelativePosition(rect<s32>(15, 60 * yScale + offset, 287 * xScale, 324 * yScale)); //stText->setRelativePosition(rect<s32>(15, 60 * yScale + offset, 287 * xScale, 324 * yScale));
stSetName->setRelativePosition(rect<s32>(15, 60, 296 * xScale, 60 + offset));
stText->setRelativePosition(rect<s32>(15, 60 + offset, 287 * xScale, 324 * yScale));
scrCardText->setRelativePosition(rect<s32>(287 * xScale - 20, 60 + offset, 287 * xScale, 324 * yScale)); scrCardText->setRelativePosition(rect<s32>(287 * xScale - 20, 60 + offset, 287 * xScale, 324 * yScale));
} }
showingcode = code; showingcode = code;
...@@ -1528,7 +1532,7 @@ void Game::OnResize() { ...@@ -1528,7 +1532,7 @@ void Game::OnResize() {
lpcFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, 48 * yScale); lpcFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.numfont, 48 * yScale);
//guiFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize * yScale); //guiFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize * yScale);
//env->getSkin()->setFont(guiFont); //env->getSkin()->setFont(guiFont);
textFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, gameConf.textfontsize * yScale); textFont = irr::gui::CGUITTFont::createTTFont(env, gameConf.textfont, (yScale > 0.642 ? gameConf.textfontsize * yScale : 9));
old_numFont->drop(); old_numFont->drop();
old_adFont->drop(); old_adFont->drop();
old_lpcFont->drop(); old_lpcFont->drop();
...@@ -1631,9 +1635,10 @@ void Game::OnResize() { ...@@ -1631,9 +1635,10 @@ void Game::OnResize() {
wCardImg->setRelativePosition(ResizeCard(1, 1, 20, 18)); wCardImg->setRelativePosition(ResizeCard(1, 1, 20, 18));
imgCard->setRelativePosition(ResizeCard(10, 9, 0, 0)); imgCard->setRelativePosition(ResizeCard(10, 9, 0, 0));
wInfos->setRelativePosition(Resize(1, 275, 301, 639)); wInfos->setRelativePosition(Resize(1, 275, 301, 639));
stName->setRelativePosition(recti(10, 10, 300 * xScale - 13, 10 + 22 * yScale)); stName->setRelativePosition(recti(10, 10, 300 * xScale - 13, 10 + 22));
stInfo->setRelativePosition(recti(15, 37 * yScale, 300 * xScale - 13, 60 * yScale)); //stName->setRelativePosition(recti(10, 10, 300 * xScale - 13, 10 + 22 * yScale));
stDataInfo->setRelativePosition(recti(15, 60 * yScale, 300 * xScale - 13, 83 * yScale)); //stInfo->setRelativePosition(recti(15, 37 * yScale, 300 * xScale - 13, 60 * yScale));
//stDataInfo->setRelativePosition(recti(15, 60 * yScale, 300 * xScale - 13, 83 * yScale));
lstLog->setRelativePosition(Resize(10, 10, 290, 290)); lstLog->setRelativePosition(Resize(10, 10, 290, 290));
//const auto& tsize = stText->getRelativePosition(); //const auto& tsize = stText->getRelativePosition();
if(showingcode) if(showingcode)
......
This diff is collapsed.
...@@ -415,6 +415,7 @@ ...@@ -415,6 +415,7 @@
!system 1418 额外卡组数量应不超过15张,当前卡组数量为%d张。 !system 1418 额外卡组数量应不超过15张,当前卡组数量为%d张。
!system 1419 副卡组数量应不超过15张,当前卡组数量为%d张。 !system 1419 副卡组数量应不超过15张,当前卡组数量为%d张。
!system 1420 有额外卡组卡片存在于主卡组,可能是额外卡组数量超过15张。 !system 1420 有额外卡组卡片存在于主卡组,可能是额外卡组数量超过15张。
!system 1421 宣言的卡不符合条件,或无法被主机识别。
!system 1500 决斗结束。 !system 1500 决斗结束。
!system 1501 录像结束。 !system 1501 录像结束。
!system 1502 连接已断开。 !system 1502 连接已断开。
......
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