Commit f0b94b77 authored by fallenstardust's avatar fallenstardust

添加计分板图标

parent 2db2f97e
......@@ -1641,10 +1641,9 @@ void Game::DrawDeckBd() {
driver->draw2DRectangleOutline(Resize(420, 136, 628, 157));
// 显示“限”的文字图标
DrawShadowText(guiFont, L"限", Resize(425, 136, 435, 156), Resize(0, 1, 2, 0), 0xffffffff, 0xff000000, true,true);
driver->draw2DImage(imageManager.tGSC, ResizeWin(425, 136, 445, 157), irr::core::recti(0, 0, 64, 64), 0, 0, true);
int intValue = static_cast<int>(it->second);//获取被选定的genesys禁卡表的上限值,并显示在界面上
DrawShadowText(guiFont, std::to_wstring(intValue), Resize(440, 136, 460, 156), Resize(0, 1, 2, 0), 0xffffffff, 0xff000000, true,true);
DrawShadowText(guiFont, std::to_wstring(intValue), ResizeWin(450, 136, 470, 156), Resize(0, 1, 2, 0), 0xffffffff, 0xff000000, true,true);
//遍历genesys禁卡表的卡片点数表,统计当前卡组点数合计值
int totalCredits = 0;
......@@ -1700,18 +1699,18 @@ void Game::DrawDeckBd() {
}
}
irr::video::SColor color = 0xffffffff;// 设置默认数字颜色值为白色
DrawShadowText(guiFont, L"计", Resize(470, 136, 480, 156), Resize(0, 1, 2, 0), 0xffffffff, 0xff000000, true,true);
driver->draw2DImage(imageManager.tGSC, ResizeWin(480, 136, 500, 157), irr::core::recti(64, 0, 128, 64), 0, 0, true);
color = totalCredits > intValue ? 0xffff0000 : 0xffffffff;// 如果点数总和超过上限则设置数字颜色为红色,否则为白色
DrawShadowText(guiFont, std::to_wstring(totalCredits), Resize(485, 136, 505, 156), Resize(0, 1, 2, 0), color, 0xff000000, true,true);
DrawShadowText(guiFont, std::to_wstring(totalCredits), ResizeWin(505, 136, 525, 156), Resize(0, 1, 2, 0), color, 0xff000000, true,true);
// 显示剩余点数
DrawShadowText(guiFont, L"余", Resize(515, 136, 525, 156), Resize(0, 1, 2, 0), 0xffffffff, 0xff000000, true,true);
driver->draw2DImage(imageManager.tGSC, ResizeWin(535, 136, 555, 157), irr::core::recti(128, 0, 192, 64), 0, 0, true);
int remaining = intValue - totalCredits;
color = remaining < 0 ? 0xffff0000 : 0xffffffff;// 剩余点数小于0则设置数字颜色为红色,否则为白色
DrawShadowText(guiFont, std::to_wstring(remaining), Resize(530, 136, 550, 156), Resize(0, 1, 2, 0), color, 0xff000000, true,true);
DrawShadowText(guiFont, std::to_wstring(remaining), ResizeWin(560, 136, 580, 156), Resize(0, 1, 2, 0), color, 0xff000000, true,true);
// Genesys标志
DrawShadowText(guiFont, L"GENESYS", Resize(560, 136, 623, 156), Resize(0, 1, 2, 0), 0xffffffff, 0xff000000, true,true);
driver->draw2DImage(imageManager.tGSC, Resize(590, 136, 623, 156), irr::core::recti(192, 0, 448, 64), 0, 0, true);
}
// 主卡组内容区背景与边框
......
......@@ -86,6 +86,7 @@ bool ImageManager::Initial(const path dir) {
snprintf(buff, 100, "/textures/extra/lscale_%d.png", i);
tLScale[i] = driver->getTexture((dir + path(buff)).c_str());
}
tGSC = driver->getTexture((dir + path("/textures/extra/gsc.png")).c_str());
tClock = driver->getTexture((dir + path("/textures/tiktok.png")).c_str());
support_types.push_back(std::string("jpg"));
support_types.push_back(std::string("png"));
......
......@@ -57,6 +57,7 @@ public:
irr::video::ITexture* tFieldTransparent[2];
irr::video::ITexture* tRScale[14];
irr::video::ITexture* tLScale[14];
irr::video::ITexture* tGSC;
irr::video::ITexture* tClock;
irr::video::ITexture* tCardType;
irr::video::ITexture* tAvatar[2];
......
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