Commit 006d973d authored by Chen Bill's avatar Chen Bill

replace irr::core::rect<s32>

parent 194608f8
...@@ -431,7 +431,7 @@ void ClientField::ShowSelectCard(bool buttonok, bool chain) { ...@@ -431,7 +431,7 @@ void ClientField::ShowSelectCard(bool buttonok, bool chain) {
mainGame->imageLoading.insert(std::make_pair(mainGame->btnCardSelect[i], selectable_cards[i]->chain_code)); mainGame->imageLoading.insert(std::make_pair(mainGame->btnCardSelect[i], selectable_cards[i]->chain_code));
else else
mainGame->btnCardSelect[i]->setImage(imageManager.tCover[selectable_cards[i]->controler + 2]); mainGame->btnCardSelect[i]->setImage(imageManager.tCover[selectable_cards[i]->controler + 2]);
mainGame->btnCardSelect[i]->setRelativePosition(rect<s32>(startpos + i * 125, 55, startpos + 120 + i * 125, 225)); mainGame->btnCardSelect[i]->setRelativePosition(irr::core::rect<s32>(startpos + i * 125, 55, startpos + 120 + i * 125, 225));
mainGame->btnCardSelect[i]->setPressed(false); mainGame->btnCardSelect[i]->setPressed(false);
mainGame->btnCardSelect[i]->setVisible(true); mainGame->btnCardSelect[i]->setVisible(true);
if(mainGame->dInfo.curMsg != MSG_SORT_CARD) { if(mainGame->dInfo.curMsg != MSG_SORT_CARD) {
...@@ -486,7 +486,7 @@ void ClientField::ShowSelectCard(bool buttonok, bool chain) { ...@@ -486,7 +486,7 @@ void ClientField::ShowSelectCard(bool buttonok, bool chain) {
mainGame->stCardPos[i]->setBackgroundColor(0xffffffff); mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
} }
mainGame->stCardPos[i]->setVisible(true); mainGame->stCardPos[i]->setVisible(true);
mainGame->stCardPos[i]->setRelativePosition(rect<s32>(startpos + i * 125, 30, startpos + 120 + i * 125, 50)); mainGame->stCardPos[i]->setRelativePosition(irr::core::rect<s32>(startpos + i * 125, 30, startpos + 120 + i * 125, 50));
} }
if(selectable_cards.size() <= 5) { if(selectable_cards.size() <= 5) {
for(int i = selectable_cards.size(); i < 5; ++i) { for(int i = selectable_cards.size(); i < 5; ++i) {
...@@ -519,7 +519,7 @@ void ClientField::ShowChainCard() { ...@@ -519,7 +519,7 @@ void ClientField::ShowChainCard() {
mainGame->imageLoading.insert(std::make_pair(mainGame->btnCardSelect[i], selectable_cards[i]->code)); mainGame->imageLoading.insert(std::make_pair(mainGame->btnCardSelect[i], selectable_cards[i]->code));
else else
mainGame->btnCardSelect[i]->setImage(imageManager.tCover[selectable_cards[i]->controler + 2]); mainGame->btnCardSelect[i]->setImage(imageManager.tCover[selectable_cards[i]->controler + 2]);
mainGame->btnCardSelect[i]->setRelativePosition(rect<s32>(startpos + i * 125, 55, startpos + 120 + i * 125, 225)); mainGame->btnCardSelect[i]->setRelativePosition(irr::core::rect<s32>(startpos + i * 125, 55, startpos + 120 + i * 125, 225));
mainGame->btnCardSelect[i]->setPressed(false); mainGame->btnCardSelect[i]->setPressed(false);
mainGame->btnCardSelect[i]->setVisible(true); mainGame->btnCardSelect[i]->setVisible(true);
wchar_t formatBuffer[2048]; wchar_t formatBuffer[2048];
...@@ -538,7 +538,7 @@ void ClientField::ShowChainCard() { ...@@ -538,7 +538,7 @@ void ClientField::ShowChainCard() {
else mainGame->stCardPos[i]->setBackgroundColor(0xffffffff); else mainGame->stCardPos[i]->setBackgroundColor(0xffffffff);
} }
mainGame->stCardPos[i]->setVisible(true); mainGame->stCardPos[i]->setVisible(true);
mainGame->stCardPos[i]->setRelativePosition(rect<s32>(startpos + i * 125, 30, startpos + 120 + i * 125, 50)); mainGame->stCardPos[i]->setRelativePosition(irr::core::rect<s32>(startpos + i * 125, 30, startpos + 120 + i * 125, 50));
} }
if(selectable_cards.size() <= 5) { if(selectable_cards.size() <= 5) {
for(int i = selectable_cards.size(); i < 5; ++i) { for(int i = selectable_cards.size(); i < 5; ++i) {
...@@ -574,7 +574,7 @@ void ClientField::ShowLocationCard() { ...@@ -574,7 +574,7 @@ void ClientField::ShowLocationCard() {
mainGame->imageLoading.insert(std::make_pair(mainGame->btnCardDisplay[i], display_cards[i]->code)); mainGame->imageLoading.insert(std::make_pair(mainGame->btnCardDisplay[i], display_cards[i]->code));
else else
mainGame->btnCardDisplay[i]->setImage(imageManager.tCover[display_cards[i]->controler + 2]); mainGame->btnCardDisplay[i]->setImage(imageManager.tCover[display_cards[i]->controler + 2]);
mainGame->btnCardDisplay[i]->setRelativePosition(rect<s32>(startpos + i * 125, 55, startpos + 120 + i * 125, 225)); mainGame->btnCardDisplay[i]->setRelativePosition(irr::core::rect<s32>(startpos + i * 125, 55, startpos + 120 + i * 125, 225));
mainGame->btnCardDisplay[i]->setPressed(false); mainGame->btnCardDisplay[i]->setPressed(false);
mainGame->btnCardDisplay[i]->setVisible(true); mainGame->btnCardDisplay[i]->setVisible(true);
wchar_t formatBuffer[2048]; wchar_t formatBuffer[2048];
...@@ -607,7 +607,7 @@ void ClientField::ShowLocationCard() { ...@@ -607,7 +607,7 @@ void ClientField::ShowLocationCard() {
mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff); mainGame->stDisplayPos[i]->setBackgroundColor(0xffffffff);
} }
mainGame->stDisplayPos[i]->setVisible(true); mainGame->stDisplayPos[i]->setVisible(true);
mainGame->stDisplayPos[i]->setRelativePosition(rect<s32>(startpos + i * 125, 30, startpos + 120 + i * 125, 50)); mainGame->stDisplayPos[i]->setRelativePosition(irr::core::rect<s32>(startpos + i * 125, 30, startpos + 120 + i * 125, 50));
} }
if(display_cards.size() <= 5) { if(display_cards.size() <= 5) {
for(int i = display_cards.size(); i < 5; ++i) { for(int i = display_cards.size(); i < 5; ++i) {
......
...@@ -413,9 +413,9 @@ void Game::DrawCard(ClientCard* pcard) { ...@@ -413,9 +413,9 @@ void Game::DrawCard(ClientCard* pcard) {
} }
} }
template<typename T> template<typename T>
void Game::DrawShadowText(irr::gui::CGUITTFont* font, const T& text, const core::rect<s32>& position, const core::rect<s32>& padding, void Game::DrawShadowText(irr::gui::CGUITTFont* font, const T& text, const irr::core::rect<s32>& position, const irr::core::rect<s32>& padding,
video::SColor color, video::SColor shadowcolor, bool hcenter, bool vcenter, const core::rect<s32>* clip) { video::SColor color, video::SColor shadowcolor, bool hcenter, bool vcenter, const irr::core::rect<s32>* clip) {
core::rect<s32> shadowposition = irr::core::recti(position.UpperLeftCorner.X - padding.UpperLeftCorner.X, position.UpperLeftCorner.Y - padding.UpperLeftCorner.Y, irr::core::rect<s32> shadowposition = irr::core::recti(position.UpperLeftCorner.X - padding.UpperLeftCorner.X, position.UpperLeftCorner.Y - padding.UpperLeftCorner.Y,
position.LowerRightCorner.X - padding.LowerRightCorner.X, position.LowerRightCorner.Y - padding.LowerRightCorner.Y); position.LowerRightCorner.X - padding.LowerRightCorner.X, position.LowerRightCorner.Y - padding.LowerRightCorner.Y);
font->drawUstring(text, shadowposition, shadowcolor, hcenter, vcenter, clip); font->drawUstring(text, shadowposition, shadowcolor, hcenter, vcenter, clip);
font->drawUstring(text, position, color, hcenter, vcenter, clip); font->drawUstring(text, position, color, hcenter, vcenter, clip);
...@@ -1143,7 +1143,7 @@ void Game::DrawThumb(code_pointer cp, irr::core::vector2di pos, const LFList* lf ...@@ -1143,7 +1143,7 @@ void Game::DrawThumb(code_pointer cp, irr::core::vector2di pos, const LFList* lf
limitloc = irr::core::recti(pos.X, pos.Y, pos.X + 20 * mainGame->xScale, pos.Y + 20 * mainGame->yScale); limitloc = irr::core::recti(pos.X, pos.Y, pos.X + 20 * mainGame->xScale, pos.Y + 20 * mainGame->yScale);
otloc = irr::core::recti(pos.X + 7, pos.Y + 50 * mainGame->yScale, pos.X + 37 * mainGame->xScale, pos.Y + 65 * mainGame->yScale); otloc = irr::core::recti(pos.X + 7, pos.Y + 50 * mainGame->yScale, pos.X + 37 * mainGame->xScale, pos.Y + 65 * mainGame->yScale);
} }
driver->draw2DImage(img, dragloc, rect<s32>(0, 0, size.Width, size.Height)); driver->draw2DImage(img, dragloc, irr::core::rect<s32>(0, 0, size.Width, size.Height));
auto lfit = lflist->content.find(lcode); auto lfit = lflist->content.find(lcode);
if (lfit != lflist->content.end()) { if (lfit != lflist->content.end()) {
switch(lfit->second) { switch(lfit->second) {
......
...@@ -1900,23 +1900,23 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) { ...@@ -1900,23 +1900,23 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
else startpos = 155; else startpos = 155;
if(positions & 0x1) { if(positions & 0x1) {
mainGame->imageLoading.insert(std::make_pair(mainGame->btnPSAU, code)); mainGame->imageLoading.insert(std::make_pair(mainGame->btnPSAU, code));
mainGame->btnPSAU->setRelativePosition(rect<s32>(startpos, 45, startpos + 140, 185)); mainGame->btnPSAU->setRelativePosition(irr::core::rect<s32>(startpos, 45, startpos + 140, 185));
mainGame->btnPSAU->setVisible(true); mainGame->btnPSAU->setVisible(true);
startpos += 145; startpos += 145;
} else mainGame->btnPSAU->setVisible(false); } else mainGame->btnPSAU->setVisible(false);
if(positions & 0x2) { if(positions & 0x2) {
mainGame->btnPSAD->setRelativePosition(rect<s32>(startpos, 45, startpos + 140, 185)); mainGame->btnPSAD->setRelativePosition(irr::core::rect<s32>(startpos, 45, startpos + 140, 185));
mainGame->btnPSAD->setVisible(true); mainGame->btnPSAD->setVisible(true);
startpos += 145; startpos += 145;
} else mainGame->btnPSAD->setVisible(false); } else mainGame->btnPSAD->setVisible(false);
if(positions & 0x4) { if(positions & 0x4) {
mainGame->imageLoading.insert(std::make_pair(mainGame->btnPSDU, code)); mainGame->imageLoading.insert(std::make_pair(mainGame->btnPSDU, code));
mainGame->btnPSDU->setRelativePosition(rect<s32>(startpos, 45, startpos + 140, 185)); mainGame->btnPSDU->setRelativePosition(irr::core::rect<s32>(startpos, 45, startpos + 140, 185));
mainGame->btnPSDU->setVisible(true); mainGame->btnPSDU->setVisible(true);
startpos += 145; startpos += 145;
} else mainGame->btnPSDU->setVisible(false); } else mainGame->btnPSDU->setVisible(false);
if(positions & 0x8) { if(positions & 0x8) {
mainGame->btnPSDD->setRelativePosition(rect<s32>(startpos, 45, startpos + 140, 185)); mainGame->btnPSDD->setRelativePosition(irr::core::rect<s32>(startpos, 45, startpos + 140, 185));
mainGame->btnPSDD->setVisible(true); mainGame->btnPSDD->setVisible(true);
startpos += 145; startpos += 145;
} else mainGame->btnPSDD->setVisible(false); } else mainGame->btnPSDD->setVisible(false);
...@@ -3672,7 +3672,7 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) { ...@@ -3672,7 +3672,7 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
mainGame->cbANNumber->setSelected(0); mainGame->cbANNumber->setSelected(0);
if(quickmode) { if(quickmode) {
mainGame->cbANNumber->setVisible(false); mainGame->cbANNumber->setVisible(false);
mainGame->btnANNumberOK->setRelativePosition(rect<s32>(20, 195, 210, 230)); mainGame->btnANNumberOK->setRelativePosition(irr::core::rect<s32>(20, 195, 210, 230));
mainGame->btnANNumberOK->setEnabled(false); mainGame->btnANNumberOK->setEnabled(false);
irr::core::recti pos = mainGame->wANNumber->getRelativePosition(); irr::core::recti pos = mainGame->wANNumber->getRelativePosition();
pos.LowerRightCorner.Y = pos.UpperLeftCorner.Y + 250; pos.LowerRightCorner.Y = pos.UpperLeftCorner.Y + 250;
...@@ -3682,7 +3682,7 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) { ...@@ -3682,7 +3682,7 @@ bool DuelClient::ClientAnalyze(unsigned char* msg, int len) {
mainGame->btnANNumber[i]->setVisible(false); mainGame->btnANNumber[i]->setVisible(false);
} }
mainGame->cbANNumber->setVisible(true); mainGame->cbANNumber->setVisible(true);
mainGame->btnANNumberOK->setRelativePosition(rect<s32>(80, 60, 150, 85)); mainGame->btnANNumberOK->setRelativePosition(irr::core::rect<s32>(80, 60, 150, 85));
irr::core::recti pos = mainGame->wANNumber->getRelativePosition(); irr::core::recti pos = mainGame->wANNumber->getRelativePosition();
pos.LowerRightCorner.Y = pos.UpperLeftCorner.Y + 95; pos.LowerRightCorner.Y = pos.UpperLeftCorner.Y + 95;
mainGame->wANNumber->setRelativePosition(pos); mainGame->wANNumber->setRelativePosition(pos);
......
...@@ -898,7 +898,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -898,7 +898,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame->btnCardSelect[i]->setImage(imageManager.GetTexture(selectable_cards[i + pos]->chain_code)); mainGame->btnCardSelect[i]->setImage(imageManager.GetTexture(selectable_cards[i + pos]->chain_code));
else else
mainGame->btnCardSelect[i]->setImage(imageManager.tCover[selectable_cards[i + pos]->controler + 2]); mainGame->btnCardSelect[i]->setImage(imageManager.tCover[selectable_cards[i + pos]->controler + 2]);
mainGame->btnCardSelect[i]->setRelativePosition(rect<s32>(30 + i * 125, 55, 30 + 120 + i * 125, 225)); mainGame->btnCardSelect[i]->setRelativePosition(irr::core::rect<s32>(30 + i * 125, 55, 30 + 120 + i * 125, 225));
// text // text
wchar_t formatBuffer[2048]; wchar_t formatBuffer[2048];
if(mainGame->dInfo.curMsg == MSG_SORT_CARD) { if(mainGame->dInfo.curMsg == MSG_SORT_CARD) {
...@@ -961,7 +961,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -961,7 +961,7 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame->btnCardDisplay[i]->setImage(imageManager.GetTexture(display_cards[i + pos]->code)); mainGame->btnCardDisplay[i]->setImage(imageManager.GetTexture(display_cards[i + pos]->code));
else else
mainGame->btnCardDisplay[i]->setImage(imageManager.tCover[display_cards[i + pos]->controler + 2]); mainGame->btnCardDisplay[i]->setImage(imageManager.tCover[display_cards[i + pos]->controler + 2]);
mainGame->btnCardDisplay[i]->setRelativePosition(rect<s32>(30 + i * 125, 55, 30 + 120 + i * 125, 225)); mainGame->btnCardDisplay[i]->setRelativePosition(irr::core::rect<s32>(30 + i * 125, 55, 30 + 120 + i * 125, 225));
wchar_t formatBuffer[2048]; wchar_t formatBuffer[2048];
if(display_cards[i + pos]->location == LOCATION_OVERLAY) { if(display_cards[i + pos]->location == LOCATION_OVERLAY) {
myswprintf(formatBuffer, L"%ls[%d](%d)", myswprintf(formatBuffer, L"%ls[%d](%d)",
...@@ -2005,13 +2005,13 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) { ...@@ -2005,13 +2005,13 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
break; break;
} }
case SCROLL_TAB_HELPER: { case SCROLL_TAB_HELPER: {
rect<s32> pos = mainGame->tabHelper->getRelativePosition(); irr::core::rect<s32> pos = mainGame->tabHelper->getRelativePosition();
mainGame->tabHelper->setRelativePosition(irr::core::recti(0, mainGame->scrTabHelper->getPos() * -1, pos.LowerRightCorner.X, pos.LowerRightCorner.Y)); mainGame->tabHelper->setRelativePosition(irr::core::recti(0, mainGame->scrTabHelper->getPos() * -1, pos.LowerRightCorner.X, pos.LowerRightCorner.Y));
return true; return true;
break; break;
} }
case SCROLL_TAB_SYSTEM: { case SCROLL_TAB_SYSTEM: {
rect<s32> pos = mainGame->tabSystem->getRelativePosition(); irr::core::rect<s32> pos = mainGame->tabSystem->getRelativePosition();
mainGame->tabSystem->setRelativePosition(irr::core::recti(0, mainGame->scrTabSystem->getPos() * -1, pos.LowerRightCorner.X, pos.LowerRightCorner.Y)); mainGame->tabSystem->setRelativePosition(irr::core::recti(0, mainGame->scrTabSystem->getPos() * -1, pos.LowerRightCorner.X, pos.LowerRightCorner.Y));
return true; return true;
break; break;
......
...@@ -202,46 +202,46 @@ bool Game::Initialize() { ...@@ -202,46 +202,46 @@ bool Game::Initialize() {
//main menu //main menu
wchar_t strbuf[256]; wchar_t strbuf[256];
myswprintf(strbuf, L"YGOPro Version:%X.0%X.%X", (PRO_VERSION & 0xf000U) >> 12, (PRO_VERSION & 0x0ff0U) >> 4, PRO_VERSION & 0x000fU); myswprintf(strbuf, L"YGOPro Version:%X.0%X.%X", (PRO_VERSION & 0xf000U) >> 12, (PRO_VERSION & 0x0ff0U) >> 4, PRO_VERSION & 0x000fU);
wMainMenu = env->addWindow(rect<s32>(370, 200, 650, 415), false, strbuf); wMainMenu = env->addWindow(irr::core::rect<s32>(370, 200, 650, 415), false, strbuf);
wMainMenu->getCloseButton()->setVisible(false); wMainMenu->getCloseButton()->setVisible(false);
btnLanMode = env->addButton(rect<s32>(10, 30, 270, 60), wMainMenu, BUTTON_LAN_MODE, dataManager.GetSysString(1200)); btnLanMode = env->addButton(irr::core::rect<s32>(10, 30, 270, 60), wMainMenu, BUTTON_LAN_MODE, dataManager.GetSysString(1200));
btnSingleMode = env->addButton(rect<s32>(10, 65, 270, 95), wMainMenu, BUTTON_SINGLE_MODE, dataManager.GetSysString(1201)); btnSingleMode = env->addButton(irr::core::rect<s32>(10, 65, 270, 95), wMainMenu, BUTTON_SINGLE_MODE, dataManager.GetSysString(1201));
btnReplayMode = env->addButton(rect<s32>(10, 100, 270, 130), wMainMenu, BUTTON_REPLAY_MODE, dataManager.GetSysString(1202)); btnReplayMode = env->addButton(irr::core::rect<s32>(10, 100, 270, 130), wMainMenu, BUTTON_REPLAY_MODE, dataManager.GetSysString(1202));
// btnTestMode = env->addButton(rect<s32>(10, 135, 270, 165), wMainMenu, BUTTON_TEST_MODE, dataManager.GetSysString(1203)); // btnTestMode = env->addButton(irr::core::rect<s32>(10, 135, 270, 165), wMainMenu, BUTTON_TEST_MODE, dataManager.GetSysString(1203));
btnDeckEdit = env->addButton(rect<s32>(10, 135, 270, 165), wMainMenu, BUTTON_DECK_EDIT, dataManager.GetSysString(1204)); btnDeckEdit = env->addButton(irr::core::rect<s32>(10, 135, 270, 165), wMainMenu, BUTTON_DECK_EDIT, dataManager.GetSysString(1204));
btnModeExit = env->addButton(rect<s32>(10, 170, 270, 200), wMainMenu, BUTTON_MODE_EXIT, dataManager.GetSysString(1210)); btnModeExit = env->addButton(irr::core::rect<s32>(10, 170, 270, 200), wMainMenu, BUTTON_MODE_EXIT, dataManager.GetSysString(1210));
//lan mode //lan mode
wLanWindow = env->addWindow(rect<s32>(220, 100, 800, 520), false, dataManager.GetSysString(1200)); wLanWindow = env->addWindow(irr::core::rect<s32>(220, 100, 800, 520), false, dataManager.GetSysString(1200));
wLanWindow->getCloseButton()->setVisible(false); wLanWindow->getCloseButton()->setVisible(false);
wLanWindow->setVisible(false); wLanWindow->setVisible(false);
env->addStaticText(dataManager.GetSysString(1220), rect<s32>(10, 30, 220, 50), false, false, wLanWindow); env->addStaticText(dataManager.GetSysString(1220), irr::core::rect<s32>(10, 30, 220, 50), false, false, wLanWindow);
ebNickName = env->addEditBox(gameConf.nickname, rect<s32>(110, 25, 450, 50), true, wLanWindow); ebNickName = env->addEditBox(gameConf.nickname, irr::core::rect<s32>(110, 25, 450, 50), true, wLanWindow);
ebNickName->setTextAlignment(irr::gui::EGUIA_UPPERLEFT, irr::gui::EGUIA_CENTER); ebNickName->setTextAlignment(irr::gui::EGUIA_UPPERLEFT, irr::gui::EGUIA_CENTER);
lstHostList = env->addListBox(rect<s32>(10, 60, 570, 320), wLanWindow, LISTBOX_LAN_HOST, true); lstHostList = env->addListBox(irr::core::rect<s32>(10, 60, 570, 320), wLanWindow, LISTBOX_LAN_HOST, true);
lstHostList->setItemHeight(18); lstHostList->setItemHeight(18);
btnLanRefresh = env->addButton(rect<s32>(240, 325, 340, 350), wLanWindow, BUTTON_LAN_REFRESH, dataManager.GetSysString(1217)); btnLanRefresh = env->addButton(irr::core::rect<s32>(240, 325, 340, 350), wLanWindow, BUTTON_LAN_REFRESH, dataManager.GetSysString(1217));
env->addStaticText(dataManager.GetSysString(1221), rect<s32>(10, 360, 220, 380), false, false, wLanWindow); env->addStaticText(dataManager.GetSysString(1221), irr::core::rect<s32>(10, 360, 220, 380), false, false, wLanWindow);
ebJoinHost = env->addEditBox(gameConf.lasthost, rect<s32>(110, 355, 350, 380), true, wLanWindow); ebJoinHost = env->addEditBox(gameConf.lasthost, irr::core::rect<s32>(110, 355, 350, 380), true, wLanWindow);
ebJoinHost->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); ebJoinHost->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
ebJoinPort = env->addEditBox(gameConf.lastport, rect<s32>(360, 355, 420, 380), true, wLanWindow); ebJoinPort = env->addEditBox(gameConf.lastport, irr::core::rect<s32>(360, 355, 420, 380), true, wLanWindow);
ebJoinPort->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); ebJoinPort->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
env->addStaticText(dataManager.GetSysString(1222), rect<s32>(10, 390, 220, 410), false, false, wLanWindow); env->addStaticText(dataManager.GetSysString(1222), irr::core::rect<s32>(10, 390, 220, 410), false, false, wLanWindow);
ebJoinPass = env->addEditBox(gameConf.roompass, rect<s32>(110, 385, 420, 410), true, wLanWindow); ebJoinPass = env->addEditBox(gameConf.roompass, irr::core::rect<s32>(110, 385, 420, 410), true, wLanWindow);
ebJoinPass->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); ebJoinPass->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
btnJoinHost = env->addButton(rect<s32>(460, 355, 570, 380), wLanWindow, BUTTON_JOIN_HOST, dataManager.GetSysString(1223)); btnJoinHost = env->addButton(irr::core::rect<s32>(460, 355, 570, 380), wLanWindow, BUTTON_JOIN_HOST, dataManager.GetSysString(1223));
btnJoinCancel = env->addButton(rect<s32>(460, 385, 570, 410), wLanWindow, BUTTON_JOIN_CANCEL, dataManager.GetSysString(1212)); btnJoinCancel = env->addButton(irr::core::rect<s32>(460, 385, 570, 410), wLanWindow, BUTTON_JOIN_CANCEL, dataManager.GetSysString(1212));
btnCreateHost = env->addButton(rect<s32>(460, 25, 570, 50), wLanWindow, BUTTON_CREATE_HOST, dataManager.GetSysString(1224)); btnCreateHost = env->addButton(irr::core::rect<s32>(460, 25, 570, 50), wLanWindow, BUTTON_CREATE_HOST, dataManager.GetSysString(1224));
//create host //create host
wCreateHost = env->addWindow(rect<s32>(320, 100, 700, 520), false, dataManager.GetSysString(1224)); wCreateHost = env->addWindow(irr::core::rect<s32>(320, 100, 700, 520), false, dataManager.GetSysString(1224));
wCreateHost->getCloseButton()->setVisible(false); wCreateHost->getCloseButton()->setVisible(false);
wCreateHost->setVisible(false); wCreateHost->setVisible(false);
env->addStaticText(dataManager.GetSysString(1226), rect<s32>(20, 30, 220, 50), false, false, wCreateHost); env->addStaticText(dataManager.GetSysString(1226), irr::core::rect<s32>(20, 30, 220, 50), false, false, wCreateHost);
cbHostLFlist = env->addComboBox(rect<s32>(140, 25, 300, 50), wCreateHost); cbHostLFlist = env->addComboBox(irr::core::rect<s32>(140, 25, 300, 50), wCreateHost);
for(unsigned int i = 0; i < deckManager._lfList.size(); ++i) for(unsigned int i = 0; i < deckManager._lfList.size(); ++i)
cbHostLFlist->addItem(deckManager._lfList[i].listName.c_str(), deckManager._lfList[i].hash); cbHostLFlist->addItem(deckManager._lfList[i].listName.c_str(), deckManager._lfList[i].hash);
cbHostLFlist->setSelected(gameConf.use_lflist ? gameConf.default_lflist : cbHostLFlist->getItemCount() - 1); cbHostLFlist->setSelected(gameConf.use_lflist ? gameConf.default_lflist : cbHostLFlist->getItemCount() - 1);
env->addStaticText(dataManager.GetSysString(1225), rect<s32>(20, 60, 220, 80), false, false, wCreateHost); env->addStaticText(dataManager.GetSysString(1225), irr::core::rect<s32>(20, 60, 220, 80), false, false, wCreateHost);
cbRule = env->addComboBox(rect<s32>(140, 55, 300, 80), wCreateHost); cbRule = env->addComboBox(irr::core::rect<s32>(140, 55, 300, 80), wCreateHost);
cbRule->setMaxSelectionRows(10); cbRule->setMaxSelectionRows(10);
cbRule->addItem(dataManager.GetSysString(1481)); cbRule->addItem(dataManager.GetSysString(1481));
cbRule->addItem(dataManager.GetSysString(1482)); cbRule->addItem(dataManager.GetSysString(1482));
...@@ -266,123 +266,123 @@ bool Game::Initialize() { ...@@ -266,123 +266,123 @@ bool Game::Initialize() {
cbRule->setSelected(5); cbRule->setSelected(5);
break; break;
} }
env->addStaticText(dataManager.GetSysString(1227), rect<s32>(20, 90, 220, 110), false, false, wCreateHost); env->addStaticText(dataManager.GetSysString(1227), irr::core::rect<s32>(20, 90, 220, 110), false, false, wCreateHost);
cbMatchMode = env->addComboBox(rect<s32>(140, 85, 300, 110), wCreateHost); cbMatchMode = env->addComboBox(irr::core::rect<s32>(140, 85, 300, 110), wCreateHost);
cbMatchMode->addItem(dataManager.GetSysString(1244)); cbMatchMode->addItem(dataManager.GetSysString(1244));
cbMatchMode->addItem(dataManager.GetSysString(1245)); cbMatchMode->addItem(dataManager.GetSysString(1245));
cbMatchMode->addItem(dataManager.GetSysString(1246)); cbMatchMode->addItem(dataManager.GetSysString(1246));
env->addStaticText(dataManager.GetSysString(1237), rect<s32>(20, 120, 320, 140), false, false, wCreateHost); env->addStaticText(dataManager.GetSysString(1237), irr::core::rect<s32>(20, 120, 320, 140), false, false, wCreateHost);
myswprintf(strbuf, L"%d", 180); myswprintf(strbuf, L"%d", 180);
ebTimeLimit = env->addEditBox(strbuf, rect<s32>(140, 115, 220, 140), true, wCreateHost); ebTimeLimit = env->addEditBox(strbuf, irr::core::rect<s32>(140, 115, 220, 140), true, wCreateHost);
ebTimeLimit->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); ebTimeLimit->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
env->addStaticText(dataManager.GetSysString(1228), rect<s32>(20, 150, 320, 170), false, false, wCreateHost); env->addStaticText(dataManager.GetSysString(1228), irr::core::rect<s32>(20, 150, 320, 170), false, false, wCreateHost);
env->addStaticText(dataManager.GetSysString(1236), rect<s32>(20, 180, 220, 200), false, false, wCreateHost); env->addStaticText(dataManager.GetSysString(1236), irr::core::rect<s32>(20, 180, 220, 200), false, false, wCreateHost);
cbDuelRule = env->addComboBox(rect<s32>(140, 175, 300, 200), wCreateHost); cbDuelRule = env->addComboBox(irr::core::rect<s32>(140, 175, 300, 200), wCreateHost);
cbDuelRule->addItem(dataManager.GetSysString(1260)); cbDuelRule->addItem(dataManager.GetSysString(1260));
cbDuelRule->addItem(dataManager.GetSysString(1261)); cbDuelRule->addItem(dataManager.GetSysString(1261));
cbDuelRule->addItem(dataManager.GetSysString(1262)); cbDuelRule->addItem(dataManager.GetSysString(1262));
cbDuelRule->addItem(dataManager.GetSysString(1263)); cbDuelRule->addItem(dataManager.GetSysString(1263));
cbDuelRule->addItem(dataManager.GetSysString(1264)); cbDuelRule->addItem(dataManager.GetSysString(1264));
cbDuelRule->setSelected(gameConf.default_rule - 1); cbDuelRule->setSelected(gameConf.default_rule - 1);
chkNoCheckDeck = env->addCheckBox(false, rect<s32>(20, 210, 170, 230), wCreateHost, -1, dataManager.GetSysString(1229)); chkNoCheckDeck = env->addCheckBox(false, irr::core::rect<s32>(20, 210, 170, 230), wCreateHost, -1, dataManager.GetSysString(1229));
chkNoShuffleDeck = env->addCheckBox(false, rect<s32>(180, 210, 360, 230), wCreateHost, -1, dataManager.GetSysString(1230)); chkNoShuffleDeck = env->addCheckBox(false, irr::core::rect<s32>(180, 210, 360, 230), wCreateHost, -1, dataManager.GetSysString(1230));
env->addStaticText(dataManager.GetSysString(1231), rect<s32>(20, 240, 320, 260), false, false, wCreateHost); env->addStaticText(dataManager.GetSysString(1231), irr::core::rect<s32>(20, 240, 320, 260), false, false, wCreateHost);
myswprintf(strbuf, L"%d", 8000); myswprintf(strbuf, L"%d", 8000);
ebStartLP = env->addEditBox(strbuf, rect<s32>(140, 235, 220, 260), true, wCreateHost); ebStartLP = env->addEditBox(strbuf, irr::core::rect<s32>(140, 235, 220, 260), true, wCreateHost);
ebStartLP->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); ebStartLP->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
env->addStaticText(dataManager.GetSysString(1232), rect<s32>(20, 270, 320, 290), false, false, wCreateHost); env->addStaticText(dataManager.GetSysString(1232), irr::core::rect<s32>(20, 270, 320, 290), false, false, wCreateHost);
myswprintf(strbuf, L"%d", 5); myswprintf(strbuf, L"%d", 5);
ebStartHand = env->addEditBox(strbuf, rect<s32>(140, 265, 220, 290), true, wCreateHost); ebStartHand = env->addEditBox(strbuf, irr::core::rect<s32>(140, 265, 220, 290), true, wCreateHost);
ebStartHand->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); ebStartHand->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
env->addStaticText(dataManager.GetSysString(1233), rect<s32>(20, 300, 320, 320), false, false, wCreateHost); env->addStaticText(dataManager.GetSysString(1233), irr::core::rect<s32>(20, 300, 320, 320), false, false, wCreateHost);
myswprintf(strbuf, L"%d", 1); myswprintf(strbuf, L"%d", 1);
ebDrawCount = env->addEditBox(strbuf, rect<s32>(140, 295, 220, 320), true, wCreateHost); ebDrawCount = env->addEditBox(strbuf, irr::core::rect<s32>(140, 295, 220, 320), true, wCreateHost);
ebDrawCount->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); ebDrawCount->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
env->addStaticText(dataManager.GetSysString(1234), rect<s32>(10, 360, 220, 380), false, false, wCreateHost); env->addStaticText(dataManager.GetSysString(1234), irr::core::rect<s32>(10, 360, 220, 380), false, false, wCreateHost);
ebServerName = env->addEditBox(gameConf.gamename, rect<s32>(110, 355, 250, 380), true, wCreateHost); ebServerName = env->addEditBox(gameConf.gamename, irr::core::rect<s32>(110, 355, 250, 380), true, wCreateHost);
ebServerName->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); ebServerName->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
env->addStaticText(dataManager.GetSysString(1235), rect<s32>(10, 390, 220, 410), false, false, wCreateHost); env->addStaticText(dataManager.GetSysString(1235), irr::core::rect<s32>(10, 390, 220, 410), false, false, wCreateHost);
ebServerPass = env->addEditBox(L"", rect<s32>(110, 385, 250, 410), true, wCreateHost); ebServerPass = env->addEditBox(L"", irr::core::rect<s32>(110, 385, 250, 410), true, wCreateHost);
ebServerPass->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); ebServerPass->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
btnHostConfirm = env->addButton(rect<s32>(260, 355, 370, 380), wCreateHost, BUTTON_HOST_CONFIRM, dataManager.GetSysString(1211)); btnHostConfirm = env->addButton(irr::core::rect<s32>(260, 355, 370, 380), wCreateHost, BUTTON_HOST_CONFIRM, dataManager.GetSysString(1211));
btnHostCancel = env->addButton(rect<s32>(260, 385, 370, 410), wCreateHost, BUTTON_HOST_CANCEL, dataManager.GetSysString(1212)); btnHostCancel = env->addButton(irr::core::rect<s32>(260, 385, 370, 410), wCreateHost, BUTTON_HOST_CANCEL, dataManager.GetSysString(1212));
//host(single) //host(single)
wHostPrepare = env->addWindow(rect<s32>(270, 120, 750, 440), false, dataManager.GetSysString(1250)); wHostPrepare = env->addWindow(irr::core::rect<s32>(270, 120, 750, 440), false, dataManager.GetSysString(1250));
wHostPrepare->getCloseButton()->setVisible(false); wHostPrepare->getCloseButton()->setVisible(false);
wHostPrepare->setVisible(false); wHostPrepare->setVisible(false);
btnHostPrepDuelist = env->addButton(rect<s32>(10, 30, 110, 55), wHostPrepare, BUTTON_HP_DUELIST, dataManager.GetSysString(1251)); btnHostPrepDuelist = env->addButton(irr::core::rect<s32>(10, 30, 110, 55), wHostPrepare, BUTTON_HP_DUELIST, dataManager.GetSysString(1251));
for(int i = 0; i < 2; ++i) { for(int i = 0; i < 2; ++i) {
stHostPrepDuelist[i] = env->addStaticText(L"", rect<s32>(40, 65 + i * 25, 240, 85 + i * 25), true, false, wHostPrepare); stHostPrepDuelist[i] = env->addStaticText(L"", irr::core::rect<s32>(40, 65 + i * 25, 240, 85 + i * 25), true, false, wHostPrepare);
btnHostPrepKick[i] = env->addButton(rect<s32>(10, 65 + i * 25, 30, 85 + i * 25), wHostPrepare, BUTTON_HP_KICK, L"X"); btnHostPrepKick[i] = env->addButton(irr::core::rect<s32>(10, 65 + i * 25, 30, 85 + i * 25), wHostPrepare, BUTTON_HP_KICK, L"X");
chkHostPrepReady[i] = env->addCheckBox(false, rect<s32>(250, 65 + i * 25, 270, 85 + i * 25), wHostPrepare, CHECKBOX_HP_READY, L""); chkHostPrepReady[i] = env->addCheckBox(false, irr::core::rect<s32>(250, 65 + i * 25, 270, 85 + i * 25), wHostPrepare, CHECKBOX_HP_READY, L"");
chkHostPrepReady[i]->setEnabled(false); chkHostPrepReady[i]->setEnabled(false);
} }
for(int i = 2; i < 4; ++i) { for(int i = 2; i < 4; ++i) {
stHostPrepDuelist[i] = env->addStaticText(L"", rect<s32>(40, 75 + i * 25, 240, 95 + i * 25), true, false, wHostPrepare); stHostPrepDuelist[i] = env->addStaticText(L"", irr::core::rect<s32>(40, 75 + i * 25, 240, 95 + i * 25), true, false, wHostPrepare);
btnHostPrepKick[i] = env->addButton(rect<s32>(10, 75 + i * 25, 30, 95 + i * 25), wHostPrepare, BUTTON_HP_KICK, L"X"); btnHostPrepKick[i] = env->addButton(irr::core::rect<s32>(10, 75 + i * 25, 30, 95 + i * 25), wHostPrepare, BUTTON_HP_KICK, L"X");
chkHostPrepReady[i] = env->addCheckBox(false, rect<s32>(250, 75 + i * 25, 270, 95 + i * 25), wHostPrepare, CHECKBOX_HP_READY, L""); chkHostPrepReady[i] = env->addCheckBox(false, irr::core::rect<s32>(250, 75 + i * 25, 270, 95 + i * 25), wHostPrepare, CHECKBOX_HP_READY, L"");
chkHostPrepReady[i]->setEnabled(false); chkHostPrepReady[i]->setEnabled(false);
} }
btnHostPrepOB = env->addButton(rect<s32>(10, 180, 110, 205), wHostPrepare, BUTTON_HP_OBSERVER, dataManager.GetSysString(1252)); btnHostPrepOB = env->addButton(irr::core::rect<s32>(10, 180, 110, 205), wHostPrepare, BUTTON_HP_OBSERVER, dataManager.GetSysString(1252));
myswprintf(strbuf, L"%ls%d", dataManager.GetSysString(1253), 0); myswprintf(strbuf, L"%ls%d", dataManager.GetSysString(1253), 0);
stHostPrepOB = env->addStaticText(strbuf, rect<s32>(10, 285, 270, 305), false, false, wHostPrepare); stHostPrepOB = env->addStaticText(strbuf, irr::core::rect<s32>(10, 285, 270, 305), false, false, wHostPrepare);
stHostPrepRule = env->addStaticText(L"", rect<s32>(280, 30, 460, 230), false, true, wHostPrepare); stHostPrepRule = env->addStaticText(L"", irr::core::rect<s32>(280, 30, 460, 230), false, true, wHostPrepare);
env->addStaticText(dataManager.GetSysString(1254), rect<s32>(10, 210, 110, 230), false, false, wHostPrepare); env->addStaticText(dataManager.GetSysString(1254), irr::core::rect<s32>(10, 210, 110, 230), false, false, wHostPrepare);
cbCategorySelect = env->addComboBox(rect<s32>(10, 230, 138, 255), wHostPrepare, COMBOBOX_HP_CATEGORY); cbCategorySelect = env->addComboBox(irr::core::rect<s32>(10, 230, 138, 255), wHostPrepare, COMBOBOX_HP_CATEGORY);
cbCategorySelect->setMaxSelectionRows(10); cbCategorySelect->setMaxSelectionRows(10);
cbDeckSelect = env->addComboBox(rect<s32>(142, 230, 340, 255), wHostPrepare); cbDeckSelect = env->addComboBox(irr::core::rect<s32>(142, 230, 340, 255), wHostPrepare);
cbDeckSelect->setMaxSelectionRows(10); cbDeckSelect->setMaxSelectionRows(10);
btnHostPrepReady = env->addButton(rect<s32>(170, 180, 270, 205), wHostPrepare, BUTTON_HP_READY, dataManager.GetSysString(1218)); btnHostPrepReady = env->addButton(irr::core::rect<s32>(170, 180, 270, 205), wHostPrepare, BUTTON_HP_READY, dataManager.GetSysString(1218));
btnHostPrepNotReady = env->addButton(rect<s32>(170, 180, 270, 205), wHostPrepare, BUTTON_HP_NOTREADY, dataManager.GetSysString(1219)); btnHostPrepNotReady = env->addButton(irr::core::rect<s32>(170, 180, 270, 205), wHostPrepare, BUTTON_HP_NOTREADY, dataManager.GetSysString(1219));
btnHostPrepNotReady->setVisible(false); btnHostPrepNotReady->setVisible(false);
btnHostPrepStart = env->addButton(rect<s32>(230, 280, 340, 305), wHostPrepare, BUTTON_HP_START, dataManager.GetSysString(1215)); btnHostPrepStart = env->addButton(irr::core::rect<s32>(230, 280, 340, 305), wHostPrepare, BUTTON_HP_START, dataManager.GetSysString(1215));
btnHostPrepCancel = env->addButton(rect<s32>(350, 280, 460, 305), wHostPrepare, BUTTON_HP_CANCEL, dataManager.GetSysString(1210)); btnHostPrepCancel = env->addButton(irr::core::rect<s32>(350, 280, 460, 305), wHostPrepare, BUTTON_HP_CANCEL, dataManager.GetSysString(1210));
//img //img
wCardImg = env->addStaticText(L"", rect<s32>(1, 1, 1 + CARD_IMG_WIDTH + 20, 1 + CARD_IMG_HEIGHT + 18), true, false, 0, -1, true); wCardImg = env->addStaticText(L"", irr::core::rect<s32>(1, 1, 1 + CARD_IMG_WIDTH + 20, 1 + CARD_IMG_HEIGHT + 18), true, false, 0, -1, true);
wCardImg->setBackgroundColor(0xc0c0c0c0); wCardImg->setBackgroundColor(0xc0c0c0c0);
wCardImg->setVisible(false); wCardImg->setVisible(false);
imgCard = env->addImage(rect<s32>(10, 9, 10 + CARD_IMG_WIDTH, 9 + CARD_IMG_HEIGHT), wCardImg); imgCard = env->addImage(irr::core::rect<s32>(10, 9, 10 + CARD_IMG_WIDTH, 9 + CARD_IMG_HEIGHT), wCardImg);
imgCard->setImage(imageManager.tCover[0]); imgCard->setImage(imageManager.tCover[0]);
showingcode = 0; showingcode = 0;
imgCard->setScaleImage(true); imgCard->setScaleImage(true);
imgCard->setUseAlphaChannel(true); imgCard->setUseAlphaChannel(true);
//phase //phase
wPhase = env->addStaticText(L"", rect<s32>(480, 310, 855, 330)); wPhase = env->addStaticText(L"", irr::core::rect<s32>(480, 310, 855, 330));
wPhase->setVisible(false); wPhase->setVisible(false);
btnPhaseStatus = env->addButton(rect<s32>(0, 0, 50, 20), wPhase, BUTTON_PHASE, L""); btnPhaseStatus = env->addButton(irr::core::rect<s32>(0, 0, 50, 20), wPhase, BUTTON_PHASE, L"");
btnPhaseStatus->setIsPushButton(true); btnPhaseStatus->setIsPushButton(true);
btnPhaseStatus->setPressed(true); btnPhaseStatus->setPressed(true);
btnPhaseStatus->setVisible(false); btnPhaseStatus->setVisible(false);
btnBP = env->addButton(rect<s32>(160, 0, 210, 20), wPhase, BUTTON_BP, L"\xff22\xff30"); btnBP = env->addButton(irr::core::rect<s32>(160, 0, 210, 20), wPhase, BUTTON_BP, L"\xff22\xff30");
btnBP->setVisible(false); btnBP->setVisible(false);
btnM2 = env->addButton(rect<s32>(160, 0, 210, 20), wPhase, BUTTON_M2, L"\xff2d\xff12"); btnM2 = env->addButton(irr::core::rect<s32>(160, 0, 210, 20), wPhase, BUTTON_M2, L"\xff2d\xff12");
btnM2->setVisible(false); btnM2->setVisible(false);
btnEP = env->addButton(rect<s32>(320, 0, 370, 20), wPhase, BUTTON_EP, L"\xff25\xff30"); btnEP = env->addButton(irr::core::rect<s32>(320, 0, 370, 20), wPhase, BUTTON_EP, L"\xff25\xff30");
btnEP->setVisible(false); btnEP->setVisible(false);
//tab //tab
wInfos = env->addTabControl(rect<s32>(1, 275, 301, 639), 0, true); wInfos = env->addTabControl(irr::core::rect<s32>(1, 275, 301, 639), 0, true);
wInfos->setTabExtraWidth(16); wInfos->setTabExtraWidth(16);
wInfos->setVisible(false); wInfos->setVisible(false);
//info //info
irr::gui::IGUITab* tabInfo = wInfos->addTab(dataManager.GetSysString(1270)); irr::gui::IGUITab* tabInfo = wInfos->addTab(dataManager.GetSysString(1270));
stName = env->addStaticText(L"", rect<s32>(10, 10, 287, 32), true, false, tabInfo, -1, false); stName = env->addStaticText(L"", irr::core::rect<s32>(10, 10, 287, 32), true, false, tabInfo, -1, false);
stName->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); stName->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
stInfo = env->addStaticText(L"", rect<s32>(15, 37, 296, 60), false, true, tabInfo, -1, false); stInfo = env->addStaticText(L"", irr::core::rect<s32>(15, 37, 296, 60), false, true, tabInfo, -1, false);
stInfo->setOverrideColor(irr::video::SColor(255, 0, 0, 255)); stInfo->setOverrideColor(irr::video::SColor(255, 0, 0, 255));
stDataInfo = env->addStaticText(L"", rect<s32>(15, 60, 296, 83), false, true, tabInfo, -1, false); stDataInfo = env->addStaticText(L"", irr::core::rect<s32>(15, 60, 296, 83), false, true, tabInfo, -1, false);
stDataInfo->setOverrideColor(irr::video::SColor(255, 0, 0, 255)); stDataInfo->setOverrideColor(irr::video::SColor(255, 0, 0, 255));
stSetName = env->addStaticText(L"", rect<s32>(15, 83, 296, 106), false, true, tabInfo, -1, false); stSetName = env->addStaticText(L"", irr::core::rect<s32>(15, 83, 296, 106), false, true, tabInfo, -1, false);
stSetName->setOverrideColor(irr::video::SColor(255, 0, 0, 255)); stSetName->setOverrideColor(irr::video::SColor(255, 0, 0, 255));
stText = env->addStaticText(L"", rect<s32>(15, 106, 287, 324), false, true, tabInfo, -1, false); stText = env->addStaticText(L"", irr::core::rect<s32>(15, 106, 287, 324), false, true, tabInfo, -1, false);
scrCardText = env->addScrollBar(false, rect<s32>(267, 106, 287, 324), tabInfo, SCROLL_CARDTEXT); scrCardText = env->addScrollBar(false, irr::core::rect<s32>(267, 106, 287, 324), tabInfo, SCROLL_CARDTEXT);
scrCardText->setLargeStep(1); scrCardText->setLargeStep(1);
scrCardText->setSmallStep(1); scrCardText->setSmallStep(1);
scrCardText->setVisible(false); scrCardText->setVisible(false);
//log //log
irr::gui::IGUITab* tabLog = wInfos->addTab(dataManager.GetSysString(1271)); irr::gui::IGUITab* tabLog = wInfos->addTab(dataManager.GetSysString(1271));
lstLog = env->addListBox(rect<s32>(10, 10, 290, 290), tabLog, LISTBOX_LOG, false); lstLog = env->addListBox(irr::core::rect<s32>(10, 10, 290, 290), tabLog, LISTBOX_LOG, false);
lstLog->setItemHeight(18); lstLog->setItemHeight(18);
btnClearLog = env->addButton(rect<s32>(160, 300, 260, 325), tabLog, BUTTON_CLEAR_LOG, dataManager.GetSysString(1272)); btnClearLog = env->addButton(irr::core::rect<s32>(160, 300, 260, 325), tabLog, BUTTON_CLEAR_LOG, dataManager.GetSysString(1272));
//helper //helper
irr::gui::IGUITab* _tabHelper = wInfos->addTab(dataManager.GetSysString(1298)); irr::gui::IGUITab* _tabHelper = wInfos->addTab(dataManager.GetSysString(1298));
_tabHelper->setRelativePosition(irr::core::recti(16, 49, 299, 362)); _tabHelper->setRelativePosition(irr::core::recti(16, 49, 299, 362));
...@@ -391,37 +391,37 @@ bool Game::Initialize() { ...@@ -391,37 +391,37 @@ bool Game::Initialize() {
tabHelper->getCloseButton()->setVisible(false); tabHelper->getCloseButton()->setVisible(false);
tabHelper->setDrawBackground(false); tabHelper->setDrawBackground(false);
tabHelper->setDraggable(false); tabHelper->setDraggable(false);
scrTabHelper = env->addScrollBar(false, rect<s32>(252, 0, 272, 300), _tabHelper, SCROLL_TAB_HELPER); scrTabHelper = env->addScrollBar(false, irr::core::rect<s32>(252, 0, 272, 300), _tabHelper, SCROLL_TAB_HELPER);
scrTabHelper->setLargeStep(1); scrTabHelper->setLargeStep(1);
scrTabHelper->setSmallStep(1); scrTabHelper->setSmallStep(1);
scrTabHelper->setVisible(false); scrTabHelper->setVisible(false);
int posX = 0; int posX = 0;
int posY = 0; int posY = 0;
chkMAutoPos = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1274)); chkMAutoPos = env->addCheckBox(false, irr::core::rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1274));
chkMAutoPos->setChecked(gameConf.chkMAutoPos != 0); chkMAutoPos->setChecked(gameConf.chkMAutoPos != 0);
posY += 30; posY += 30;
chkSTAutoPos = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1278)); chkSTAutoPos = env->addCheckBox(false, irr::core::rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1278));
chkSTAutoPos->setChecked(gameConf.chkSTAutoPos != 0); chkSTAutoPos->setChecked(gameConf.chkSTAutoPos != 0);
posY += 30; posY += 30;
chkRandomPos = env->addCheckBox(false, rect<s32>(posX + 20, posY, posX + 20 + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1275)); chkRandomPos = env->addCheckBox(false, irr::core::rect<s32>(posX + 20, posY, posX + 20 + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1275));
chkRandomPos->setChecked(gameConf.chkRandomPos != 0); chkRandomPos->setChecked(gameConf.chkRandomPos != 0);
posY += 30; posY += 30;
chkAutoChain = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1276)); chkAutoChain = env->addCheckBox(false, irr::core::rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1276));
chkAutoChain->setChecked(gameConf.chkAutoChain != 0); chkAutoChain->setChecked(gameConf.chkAutoChain != 0);
posY += 30; posY += 30;
chkWaitChain = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1277)); chkWaitChain = env->addCheckBox(false, irr::core::rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1277));
chkWaitChain->setChecked(gameConf.chkWaitChain != 0); chkWaitChain->setChecked(gameConf.chkWaitChain != 0);
posY += 30; posY += 30;
chkDefaultShowChain = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1354)); chkDefaultShowChain = env->addCheckBox(false, irr::core::rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1354));
chkDefaultShowChain->setChecked(gameConf.chkDefaultShowChain != 0); chkDefaultShowChain->setChecked(gameConf.chkDefaultShowChain != 0);
posY += 30; posY += 30;
chkQuickAnimation = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, CHECKBOX_QUICK_ANIMATION, dataManager.GetSysString(1299)); chkQuickAnimation = env->addCheckBox(false, irr::core::rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, CHECKBOX_QUICK_ANIMATION, dataManager.GetSysString(1299));
chkQuickAnimation->setChecked(gameConf.quick_animation != 0); chkQuickAnimation->setChecked(gameConf.quick_animation != 0);
posY += 30; posY += 30;
chkDrawSingleChain = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, CHECKBOX_DRAW_SINGLE_CHAIN, dataManager.GetSysString(1287)); chkDrawSingleChain = env->addCheckBox(false, irr::core::rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, CHECKBOX_DRAW_SINGLE_CHAIN, dataManager.GetSysString(1287));
chkDrawSingleChain->setChecked(gameConf.draw_single_chain != 0); chkDrawSingleChain->setChecked(gameConf.draw_single_chain != 0);
posY += 30; posY += 30;
chkAutoSaveReplay = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1366)); chkAutoSaveReplay = env->addCheckBox(false, irr::core::rect<s32>(posX, posY, posX + 260, posY + 25), tabHelper, -1, dataManager.GetSysString(1366));
chkAutoSaveReplay->setChecked(gameConf.auto_save_replay != 0); chkAutoSaveReplay->setChecked(gameConf.auto_save_replay != 0);
elmTabHelperLast = chkAutoSaveReplay; elmTabHelperLast = chkAutoSaveReplay;
//system //system
...@@ -432,294 +432,294 @@ bool Game::Initialize() { ...@@ -432,294 +432,294 @@ bool Game::Initialize() {
tabSystem->getCloseButton()->setVisible(false); tabSystem->getCloseButton()->setVisible(false);
tabSystem->setDrawBackground(false); tabSystem->setDrawBackground(false);
tabSystem->setDraggable(false); tabSystem->setDraggable(false);
scrTabSystem = env->addScrollBar(false, rect<s32>(252, 0, 272, 300), _tabSystem, SCROLL_TAB_SYSTEM); scrTabSystem = env->addScrollBar(false, irr::core::rect<s32>(252, 0, 272, 300), _tabSystem, SCROLL_TAB_SYSTEM);
scrTabSystem->setLargeStep(1); scrTabSystem->setLargeStep(1);
scrTabSystem->setSmallStep(1); scrTabSystem->setSmallStep(1);
scrTabSystem->setVisible(false); scrTabSystem->setVisible(false);
posY = 0; posY = 0;
chkIgnore1 = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabSystem, CHECKBOX_DISABLE_CHAT, dataManager.GetSysString(1290)); chkIgnore1 = env->addCheckBox(false, irr::core::rect<s32>(posX, posY, posX + 260, posY + 25), tabSystem, CHECKBOX_DISABLE_CHAT, dataManager.GetSysString(1290));
chkIgnore1->setChecked(gameConf.chkIgnore1 != 0); chkIgnore1->setChecked(gameConf.chkIgnore1 != 0);
posY += 30; posY += 30;
chkIgnore2 = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabSystem, -1, dataManager.GetSysString(1291)); chkIgnore2 = env->addCheckBox(false, irr::core::rect<s32>(posX, posY, posX + 260, posY + 25), tabSystem, -1, dataManager.GetSysString(1291));
chkIgnore2->setChecked(gameConf.chkIgnore2 != 0); chkIgnore2->setChecked(gameConf.chkIgnore2 != 0);
posY += 30; posY += 30;
chkHidePlayerName = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabSystem, CHECKBOX_HIDE_PLAYER_NAME, dataManager.GetSysString(1289)); chkHidePlayerName = env->addCheckBox(false, irr::core::rect<s32>(posX, posY, posX + 260, posY + 25), tabSystem, CHECKBOX_HIDE_PLAYER_NAME, dataManager.GetSysString(1289));
chkHidePlayerName->setChecked(gameConf.hide_player_name != 0); chkHidePlayerName->setChecked(gameConf.hide_player_name != 0);
posY += 30; posY += 30;
chkIgnoreDeckChanges = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabSystem, -1, dataManager.GetSysString(1357)); chkIgnoreDeckChanges = env->addCheckBox(false, irr::core::rect<s32>(posX, posY, posX + 260, posY + 25), tabSystem, -1, dataManager.GetSysString(1357));
chkIgnoreDeckChanges->setChecked(gameConf.chkIgnoreDeckChanges != 0); chkIgnoreDeckChanges->setChecked(gameConf.chkIgnoreDeckChanges != 0);
posY += 30; posY += 30;
chkAutoSearch = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabSystem, CHECKBOX_AUTO_SEARCH, dataManager.GetSysString(1358)); chkAutoSearch = env->addCheckBox(false, irr::core::rect<s32>(posX, posY, posX + 260, posY + 25), tabSystem, CHECKBOX_AUTO_SEARCH, dataManager.GetSysString(1358));
chkAutoSearch->setChecked(gameConf.auto_search_limit >= 0); chkAutoSearch->setChecked(gameConf.auto_search_limit >= 0);
posY += 30; posY += 30;
chkMultiKeywords = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabSystem, CHECKBOX_MULTI_KEYWORDS, dataManager.GetSysString(1378)); chkMultiKeywords = env->addCheckBox(false, irr::core::rect<s32>(posX, posY, posX + 260, posY + 25), tabSystem, CHECKBOX_MULTI_KEYWORDS, dataManager.GetSysString(1378));
chkMultiKeywords->setChecked(gameConf.search_multiple_keywords > 0); chkMultiKeywords->setChecked(gameConf.search_multiple_keywords > 0);
posY += 30; posY += 30;
chkPreferExpansionScript = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabSystem, CHECKBOX_PREFER_EXPANSION, dataManager.GetSysString(1379)); chkPreferExpansionScript = env->addCheckBox(false, irr::core::rect<s32>(posX, posY, posX + 260, posY + 25), tabSystem, CHECKBOX_PREFER_EXPANSION, dataManager.GetSysString(1379));
chkPreferExpansionScript->setChecked(gameConf.prefer_expansion_script != 0); chkPreferExpansionScript->setChecked(gameConf.prefer_expansion_script != 0);
posY += 30; posY += 30;
env->addStaticText(dataManager.GetSysString(1282), rect<s32>(posX + 23, posY + 3, posX + 110, posY + 28), false, false, tabSystem); env->addStaticText(dataManager.GetSysString(1282), irr::core::rect<s32>(posX + 23, posY + 3, posX + 110, posY + 28), false, false, tabSystem);
btnWinResizeS = env->addButton(rect<s32>(posX + 115, posY, posX + 145, posY + 25), tabSystem, BUTTON_WINDOW_RESIZE_S, dataManager.GetSysString(1283)); btnWinResizeS = env->addButton(irr::core::rect<s32>(posX + 115, posY, posX + 145, posY + 25), tabSystem, BUTTON_WINDOW_RESIZE_S, dataManager.GetSysString(1283));
btnWinResizeM = env->addButton(rect<s32>(posX + 150, posY, posX + 180, posY + 25), tabSystem, BUTTON_WINDOW_RESIZE_M, dataManager.GetSysString(1284)); btnWinResizeM = env->addButton(irr::core::rect<s32>(posX + 150, posY, posX + 180, posY + 25), tabSystem, BUTTON_WINDOW_RESIZE_M, dataManager.GetSysString(1284));
btnWinResizeL = env->addButton(rect<s32>(posX + 185, posY, posX + 215, posY + 25), tabSystem, BUTTON_WINDOW_RESIZE_L, dataManager.GetSysString(1285)); btnWinResizeL = env->addButton(irr::core::rect<s32>(posX + 185, posY, posX + 215, posY + 25), tabSystem, BUTTON_WINDOW_RESIZE_L, dataManager.GetSysString(1285));
btnWinResizeXL = env->addButton(rect<s32>(posX + 220, posY, posX + 250, posY + 25), tabSystem, BUTTON_WINDOW_RESIZE_XL, dataManager.GetSysString(1286)); btnWinResizeXL = env->addButton(irr::core::rect<s32>(posX + 220, posY, posX + 250, posY + 25), tabSystem, BUTTON_WINDOW_RESIZE_XL, dataManager.GetSysString(1286));
posY += 30; posY += 30;
chkLFlist = env->addCheckBox(false, rect<s32>(posX, posY, posX + 110, posY + 25), tabSystem, CHECKBOX_LFLIST, dataManager.GetSysString(1288)); chkLFlist = env->addCheckBox(false, irr::core::rect<s32>(posX, posY, posX + 110, posY + 25), tabSystem, CHECKBOX_LFLIST, dataManager.GetSysString(1288));
chkLFlist->setChecked(gameConf.use_lflist); chkLFlist->setChecked(gameConf.use_lflist);
cbLFlist = env->addComboBox(rect<s32>(posX + 115, posY, posX + 250, posY + 25), tabSystem, COMBOBOX_LFLIST); cbLFlist = env->addComboBox(irr::core::rect<s32>(posX + 115, posY, posX + 250, posY + 25), tabSystem, COMBOBOX_LFLIST);
cbLFlist->setMaxSelectionRows(6); cbLFlist->setMaxSelectionRows(6);
for(unsigned int i = 0; i < deckManager._lfList.size(); ++i) for(unsigned int i = 0; i < deckManager._lfList.size(); ++i)
cbLFlist->addItem(deckManager._lfList[i].listName.c_str()); cbLFlist->addItem(deckManager._lfList[i].listName.c_str());
cbLFlist->setEnabled(gameConf.use_lflist); cbLFlist->setEnabled(gameConf.use_lflist);
cbLFlist->setSelected(gameConf.use_lflist ? gameConf.default_lflist : cbLFlist->getItemCount() - 1); cbLFlist->setSelected(gameConf.use_lflist ? gameConf.default_lflist : cbLFlist->getItemCount() - 1);
posY += 30; posY += 30;
chkEnableSound = env->addCheckBox(gameConf.enable_sound, rect<s32>(posX, posY, posX + 120, posY + 25), tabSystem, -1, dataManager.GetSysString(1279)); chkEnableSound = env->addCheckBox(gameConf.enable_sound, irr::core::rect<s32>(posX, posY, posX + 120, posY + 25), tabSystem, -1, dataManager.GetSysString(1279));
chkEnableSound->setChecked(gameConf.enable_sound); chkEnableSound->setChecked(gameConf.enable_sound);
scrSoundVolume = env->addScrollBar(true, rect<s32>(posX + 116, posY + 4, posX + 250, posY + 21), tabSystem, SCROLL_VOLUME); scrSoundVolume = env->addScrollBar(true, irr::core::rect<s32>(posX + 116, posY + 4, posX + 250, posY + 21), tabSystem, SCROLL_VOLUME);
scrSoundVolume->setMax(100); scrSoundVolume->setMax(100);
scrSoundVolume->setMin(0); scrSoundVolume->setMin(0);
scrSoundVolume->setPos(gameConf.sound_volume * 100); scrSoundVolume->setPos(gameConf.sound_volume * 100);
scrSoundVolume->setLargeStep(1); scrSoundVolume->setLargeStep(1);
scrSoundVolume->setSmallStep(1); scrSoundVolume->setSmallStep(1);
posY += 30; posY += 30;
chkEnableMusic = env->addCheckBox(gameConf.enable_music, rect<s32>(posX, posY, posX + 120, posY + 25), tabSystem, CHECKBOX_ENABLE_MUSIC, dataManager.GetSysString(1280)); chkEnableMusic = env->addCheckBox(gameConf.enable_music, irr::core::rect<s32>(posX, posY, posX + 120, posY + 25), tabSystem, CHECKBOX_ENABLE_MUSIC, dataManager.GetSysString(1280));
chkEnableMusic->setChecked(gameConf.enable_music); chkEnableMusic->setChecked(gameConf.enable_music);
scrMusicVolume = env->addScrollBar(true, rect<s32>(posX + 116, posY + 4, posX + 250, posY + 21), tabSystem, SCROLL_VOLUME); scrMusicVolume = env->addScrollBar(true, irr::core::rect<s32>(posX + 116, posY + 4, posX + 250, posY + 21), tabSystem, SCROLL_VOLUME);
scrMusicVolume->setMax(100); scrMusicVolume->setMax(100);
scrMusicVolume->setMin(0); scrMusicVolume->setMin(0);
scrMusicVolume->setPos(gameConf.music_volume * 100); scrMusicVolume->setPos(gameConf.music_volume * 100);
scrMusicVolume->setLargeStep(1); scrMusicVolume->setLargeStep(1);
scrMusicVolume->setSmallStep(1); scrMusicVolume->setSmallStep(1);
posY += 30; posY += 30;
chkMusicMode = env->addCheckBox(false, rect<s32>(posX, posY, posX + 260, posY + 25), tabSystem, -1, dataManager.GetSysString(1281)); chkMusicMode = env->addCheckBox(false, irr::core::rect<s32>(posX, posY, posX + 260, posY + 25), tabSystem, -1, dataManager.GetSysString(1281));
chkMusicMode->setChecked(gameConf.music_mode != 0); chkMusicMode->setChecked(gameConf.music_mode != 0);
elmTabSystemLast = chkMusicMode; elmTabSystemLast = chkMusicMode;
// //
wHand = env->addWindow(rect<s32>(500, 450, 825, 605), false, L""); wHand = env->addWindow(irr::core::rect<s32>(500, 450, 825, 605), false, L"");
wHand->getCloseButton()->setVisible(false); wHand->getCloseButton()->setVisible(false);
wHand->setDraggable(false); wHand->setDraggable(false);
wHand->setDrawTitlebar(false); wHand->setDrawTitlebar(false);
wHand->setVisible(false); wHand->setVisible(false);
for(int i = 0; i < 3; ++i) { for(int i = 0; i < 3; ++i) {
btnHand[i] = env->addButton(rect<s32>(10 + 105 * i, 10, 105 + 105 * i, 144), wHand, BUTTON_HAND1 + i, L""); btnHand[i] = env->addButton(irr::core::rect<s32>(10 + 105 * i, 10, 105 + 105 * i, 144), wHand, BUTTON_HAND1 + i, L"");
btnHand[i]->setImage(imageManager.tHand[i]); btnHand[i]->setImage(imageManager.tHand[i]);
} }
// //
wFTSelect = env->addWindow(rect<s32>(550, 240, 780, 340), false, L""); wFTSelect = env->addWindow(irr::core::rect<s32>(550, 240, 780, 340), false, L"");
wFTSelect->getCloseButton()->setVisible(false); wFTSelect->getCloseButton()->setVisible(false);
wFTSelect->setVisible(false); wFTSelect->setVisible(false);
btnFirst = env->addButton(rect<s32>(10, 30, 220, 55), wFTSelect, BUTTON_FIRST, dataManager.GetSysString(100)); btnFirst = env->addButton(irr::core::rect<s32>(10, 30, 220, 55), wFTSelect, BUTTON_FIRST, dataManager.GetSysString(100));
btnSecond = env->addButton(rect<s32>(10, 60, 220, 85), wFTSelect, BUTTON_SECOND, dataManager.GetSysString(101)); btnSecond = env->addButton(irr::core::rect<s32>(10, 60, 220, 85), wFTSelect, BUTTON_SECOND, dataManager.GetSysString(101));
//message (310) //message (310)
wMessage = env->addWindow(rect<s32>(490, 200, 840, 340), false, dataManager.GetSysString(1216)); wMessage = env->addWindow(irr::core::rect<s32>(490, 200, 840, 340), false, dataManager.GetSysString(1216));
wMessage->getCloseButton()->setVisible(false); wMessage->getCloseButton()->setVisible(false);
wMessage->setVisible(false); wMessage->setVisible(false);
stMessage = env->addStaticText(L"", rect<s32>(20, 20, 350, 100), false, true, wMessage, -1, false); stMessage = env->addStaticText(L"", irr::core::rect<s32>(20, 20, 350, 100), false, true, wMessage, -1, false);
stMessage->setTextAlignment(irr::gui::EGUIA_UPPERLEFT, irr::gui::EGUIA_CENTER); stMessage->setTextAlignment(irr::gui::EGUIA_UPPERLEFT, irr::gui::EGUIA_CENTER);
btnMsgOK = env->addButton(rect<s32>(130, 105, 220, 130), wMessage, BUTTON_MSG_OK, dataManager.GetSysString(1211)); btnMsgOK = env->addButton(irr::core::rect<s32>(130, 105, 220, 130), wMessage, BUTTON_MSG_OK, dataManager.GetSysString(1211));
//auto fade message (310) //auto fade message (310)
wACMessage = env->addWindow(rect<s32>(490, 240, 840, 300), false, L""); wACMessage = env->addWindow(irr::core::rect<s32>(490, 240, 840, 300), false, L"");
wACMessage->getCloseButton()->setVisible(false); wACMessage->getCloseButton()->setVisible(false);
wACMessage->setVisible(false); wACMessage->setVisible(false);
wACMessage->setDrawBackground(false); wACMessage->setDrawBackground(false);
stACMessage = env->addStaticText(L"", rect<s32>(0, 0, 350, 60), true, true, wACMessage, -1, true); stACMessage = env->addStaticText(L"", irr::core::rect<s32>(0, 0, 350, 60), true, true, wACMessage, -1, true);
stACMessage->setBackgroundColor(0xc0c0c0ff); stACMessage->setBackgroundColor(0xc0c0c0ff);
stACMessage->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); stACMessage->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
//yes/no (310) //yes/no (310)
wQuery = env->addWindow(rect<s32>(490, 200, 840, 340), false, dataManager.GetSysString(560)); wQuery = env->addWindow(irr::core::rect<s32>(490, 200, 840, 340), false, dataManager.GetSysString(560));
wQuery->getCloseButton()->setVisible(false); wQuery->getCloseButton()->setVisible(false);
wQuery->setVisible(false); wQuery->setVisible(false);
stQMessage = env->addStaticText(L"", rect<s32>(20, 20, 350, 100), false, true, wQuery, -1, false); stQMessage = env->addStaticText(L"", irr::core::rect<s32>(20, 20, 350, 100), false, true, wQuery, -1, false);
stQMessage->setTextAlignment(irr::gui::EGUIA_UPPERLEFT, irr::gui::EGUIA_CENTER); stQMessage->setTextAlignment(irr::gui::EGUIA_UPPERLEFT, irr::gui::EGUIA_CENTER);
btnYes = env->addButton(rect<s32>(100, 105, 150, 130), wQuery, BUTTON_YES, dataManager.GetSysString(1213)); btnYes = env->addButton(irr::core::rect<s32>(100, 105, 150, 130), wQuery, BUTTON_YES, dataManager.GetSysString(1213));
btnNo = env->addButton(rect<s32>(200, 105, 250, 130), wQuery, BUTTON_NO, dataManager.GetSysString(1214)); btnNo = env->addButton(irr::core::rect<s32>(200, 105, 250, 130), wQuery, BUTTON_NO, dataManager.GetSysString(1214));
//surrender yes/no (310) //surrender yes/no (310)
wSurrender = env->addWindow(rect<s32>(490, 200, 840, 340), false, dataManager.GetSysString(560)); wSurrender = env->addWindow(irr::core::rect<s32>(490, 200, 840, 340), false, dataManager.GetSysString(560));
wSurrender->getCloseButton()->setVisible(false); wSurrender->getCloseButton()->setVisible(false);
wSurrender->setVisible(false); wSurrender->setVisible(false);
stSurrenderMessage = env->addStaticText(dataManager.GetSysString(1359), rect<s32>(20, 20, 350, 100), false, true, wSurrender, -1, false); stSurrenderMessage = env->addStaticText(dataManager.GetSysString(1359), irr::core::rect<s32>(20, 20, 350, 100), false, true, wSurrender, -1, false);
stSurrenderMessage->setTextAlignment(irr::gui::EGUIA_UPPERLEFT, irr::gui::EGUIA_CENTER); stSurrenderMessage->setTextAlignment(irr::gui::EGUIA_UPPERLEFT, irr::gui::EGUIA_CENTER);
btnSurrenderYes = env->addButton(rect<s32>(100, 105, 150, 130), wSurrender, BUTTON_SURRENDER_YES, dataManager.GetSysString(1213)); btnSurrenderYes = env->addButton(irr::core::rect<s32>(100, 105, 150, 130), wSurrender, BUTTON_SURRENDER_YES, dataManager.GetSysString(1213));
btnSurrenderNo = env->addButton(rect<s32>(200, 105, 250, 130), wSurrender, BUTTON_SURRENDER_NO, dataManager.GetSysString(1214)); btnSurrenderNo = env->addButton(irr::core::rect<s32>(200, 105, 250, 130), wSurrender, BUTTON_SURRENDER_NO, dataManager.GetSysString(1214));
//options (310) //options (310)
wOptions = env->addWindow(rect<s32>(490, 200, 840, 340), false, L""); wOptions = env->addWindow(irr::core::rect<s32>(490, 200, 840, 340), false, L"");
wOptions->getCloseButton()->setVisible(false); wOptions->getCloseButton()->setVisible(false);
wOptions->setVisible(false); wOptions->setVisible(false);
stOptions = env->addStaticText(L"", rect<s32>(20, 20, 350, 100), false, true, wOptions, -1, false); stOptions = env->addStaticText(L"", irr::core::rect<s32>(20, 20, 350, 100), false, true, wOptions, -1, false);
stOptions->setTextAlignment(irr::gui::EGUIA_UPPERLEFT, irr::gui::EGUIA_CENTER); stOptions->setTextAlignment(irr::gui::EGUIA_UPPERLEFT, irr::gui::EGUIA_CENTER);
btnOptionOK = env->addButton(rect<s32>(130, 105, 220, 130), wOptions, BUTTON_OPTION_OK, dataManager.GetSysString(1211)); btnOptionOK = env->addButton(irr::core::rect<s32>(130, 105, 220, 130), wOptions, BUTTON_OPTION_OK, dataManager.GetSysString(1211));
btnOptionp = env->addButton(rect<s32>(20, 105, 60, 130), wOptions, BUTTON_OPTION_PREV, L"<<<"); btnOptionp = env->addButton(irr::core::rect<s32>(20, 105, 60, 130), wOptions, BUTTON_OPTION_PREV, L"<<<");
btnOptionn = env->addButton(rect<s32>(290, 105, 330, 130), wOptions, BUTTON_OPTION_NEXT, L">>>"); btnOptionn = env->addButton(irr::core::rect<s32>(290, 105, 330, 130), wOptions, BUTTON_OPTION_NEXT, L">>>");
for(int i = 0; i < 5; ++i) { for(int i = 0; i < 5; ++i) {
btnOption[i] = env->addButton(rect<s32>(10, 30 + 40 * i, 340, 60 + 40 * i), wOptions, BUTTON_OPTION_0 + i, L""); btnOption[i] = env->addButton(irr::core::rect<s32>(10, 30 + 40 * i, 340, 60 + 40 * i), wOptions, BUTTON_OPTION_0 + i, L"");
} }
scrOption = env->addScrollBar(false, rect<s32>(350, 30, 365, 220), wOptions, SCROLL_OPTION_SELECT); scrOption = env->addScrollBar(false, irr::core::rect<s32>(350, 30, 365, 220), wOptions, SCROLL_OPTION_SELECT);
scrOption->setLargeStep(1); scrOption->setLargeStep(1);
scrOption->setSmallStep(1); scrOption->setSmallStep(1);
scrOption->setMin(0); scrOption->setMin(0);
//pos select //pos select
wPosSelect = env->addWindow(rect<s32>(340, 200, 935, 410), false, dataManager.GetSysString(561)); wPosSelect = env->addWindow(irr::core::rect<s32>(340, 200, 935, 410), false, dataManager.GetSysString(561));
wPosSelect->getCloseButton()->setVisible(false); wPosSelect->getCloseButton()->setVisible(false);
wPosSelect->setVisible(false); wPosSelect->setVisible(false);
btnPSAU = irr::gui::CGUIImageButton::addImageButton(env, rect<s32>(10, 45, 150, 185), wPosSelect, BUTTON_POS_AU); btnPSAU = irr::gui::CGUIImageButton::addImageButton(env, irr::core::rect<s32>(10, 45, 150, 185), wPosSelect, BUTTON_POS_AU);
btnPSAU->setImageSize(core::dimension2di(CARD_IMG_WIDTH * 0.5f, CARD_IMG_HEIGHT * 0.5f)); btnPSAU->setImageSize(core::dimension2di(CARD_IMG_WIDTH * 0.5f, CARD_IMG_HEIGHT * 0.5f));
btnPSAD = irr::gui::CGUIImageButton::addImageButton(env, rect<s32>(155, 45, 295, 185), wPosSelect, BUTTON_POS_AD); btnPSAD = irr::gui::CGUIImageButton::addImageButton(env, irr::core::rect<s32>(155, 45, 295, 185), wPosSelect, BUTTON_POS_AD);
btnPSAD->setImageSize(core::dimension2di(CARD_IMG_WIDTH * 0.5f, CARD_IMG_HEIGHT * 0.5f)); btnPSAD->setImageSize(core::dimension2di(CARD_IMG_WIDTH * 0.5f, CARD_IMG_HEIGHT * 0.5f));
btnPSAD->setImage(imageManager.tCover[2]); btnPSAD->setImage(imageManager.tCover[2]);
btnPSDU = irr::gui::CGUIImageButton::addImageButton(env, rect<s32>(300, 45, 440, 185), wPosSelect, BUTTON_POS_DU); btnPSDU = irr::gui::CGUIImageButton::addImageButton(env, irr::core::rect<s32>(300, 45, 440, 185), wPosSelect, BUTTON_POS_DU);
btnPSDU->setImageSize(core::dimension2di(CARD_IMG_WIDTH * 0.5f, CARD_IMG_HEIGHT * 0.5f)); btnPSDU->setImageSize(core::dimension2di(CARD_IMG_WIDTH * 0.5f, CARD_IMG_HEIGHT * 0.5f));
btnPSDU->setImageRotation(270); btnPSDU->setImageRotation(270);
btnPSDD = irr::gui::CGUIImageButton::addImageButton(env, rect<s32>(445, 45, 585, 185), wPosSelect, BUTTON_POS_DD); btnPSDD = irr::gui::CGUIImageButton::addImageButton(env, irr::core::rect<s32>(445, 45, 585, 185), wPosSelect, BUTTON_POS_DD);
btnPSDD->setImageSize(core::dimension2di(CARD_IMG_WIDTH * 0.5f, CARD_IMG_HEIGHT * 0.5f)); btnPSDD->setImageSize(core::dimension2di(CARD_IMG_WIDTH * 0.5f, CARD_IMG_HEIGHT * 0.5f));
btnPSDD->setImageRotation(270); btnPSDD->setImageRotation(270);
btnPSDD->setImage(imageManager.tCover[2]); btnPSDD->setImage(imageManager.tCover[2]);
//card select //card select
wCardSelect = env->addWindow(rect<s32>(320, 100, 1000, 400), false, L""); wCardSelect = env->addWindow(irr::core::rect<s32>(320, 100, 1000, 400), false, L"");
wCardSelect->getCloseButton()->setVisible(false); wCardSelect->getCloseButton()->setVisible(false);
wCardSelect->setVisible(false); wCardSelect->setVisible(false);
for(int i = 0; i < 5; ++i) { for(int i = 0; i < 5; ++i) {
stCardPos[i] = env->addStaticText(L"", rect<s32>(30 + 125 * i, 30, 150 + 125 * i, 50), true, false, wCardSelect, -1, true); stCardPos[i] = env->addStaticText(L"", irr::core::rect<s32>(30 + 125 * i, 30, 150 + 125 * i, 50), true, false, wCardSelect, -1, true);
stCardPos[i]->setBackgroundColor(0xffffffff); stCardPos[i]->setBackgroundColor(0xffffffff);
stCardPos[i]->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); stCardPos[i]->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
btnCardSelect[i] = irr::gui::CGUIImageButton::addImageButton(env, rect<s32>(30 + 125 * i, 55, 150 + 125 * i, 225), wCardSelect, BUTTON_CARD_0 + i); btnCardSelect[i] = irr::gui::CGUIImageButton::addImageButton(env, irr::core::rect<s32>(30 + 125 * i, 55, 150 + 125 * i, 225), wCardSelect, BUTTON_CARD_0 + i);
btnCardSelect[i]->setImageSize(core::dimension2di(CARD_IMG_WIDTH * 0.6f, CARD_IMG_HEIGHT * 0.6f)); btnCardSelect[i]->setImageSize(core::dimension2di(CARD_IMG_WIDTH * 0.6f, CARD_IMG_HEIGHT * 0.6f));
} }
scrCardList = env->addScrollBar(true, rect<s32>(30, 235, 650, 255), wCardSelect, SCROLL_CARD_SELECT); scrCardList = env->addScrollBar(true, irr::core::rect<s32>(30, 235, 650, 255), wCardSelect, SCROLL_CARD_SELECT);
btnSelectOK = env->addButton(rect<s32>(300, 265, 380, 290), wCardSelect, BUTTON_CARD_SEL_OK, dataManager.GetSysString(1211)); btnSelectOK = env->addButton(irr::core::rect<s32>(300, 265, 380, 290), wCardSelect, BUTTON_CARD_SEL_OK, dataManager.GetSysString(1211));
//card display //card display
wCardDisplay = env->addWindow(rect<s32>(320, 100, 1000, 400), false, L""); wCardDisplay = env->addWindow(irr::core::rect<s32>(320, 100, 1000, 400), false, L"");
wCardDisplay->getCloseButton()->setVisible(false); wCardDisplay->getCloseButton()->setVisible(false);
wCardDisplay->setVisible(false); wCardDisplay->setVisible(false);
for(int i = 0; i < 5; ++i) { for(int i = 0; i < 5; ++i) {
stDisplayPos[i] = env->addStaticText(L"", rect<s32>(30 + 125 * i, 30, 150 + 125 * i, 50), true, false, wCardDisplay, -1, true); stDisplayPos[i] = env->addStaticText(L"", irr::core::rect<s32>(30 + 125 * i, 30, 150 + 125 * i, 50), true, false, wCardDisplay, -1, true);
stDisplayPos[i]->setBackgroundColor(0xffffffff); stDisplayPos[i]->setBackgroundColor(0xffffffff);
stDisplayPos[i]->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); stDisplayPos[i]->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
btnCardDisplay[i] = irr::gui::CGUIImageButton::addImageButton(env, rect<s32>(30 + 125 * i, 55, 150 + 125 * i, 225), wCardDisplay, BUTTON_DISPLAY_0 + i); btnCardDisplay[i] = irr::gui::CGUIImageButton::addImageButton(env, irr::core::rect<s32>(30 + 125 * i, 55, 150 + 125 * i, 225), wCardDisplay, BUTTON_DISPLAY_0 + i);
btnCardDisplay[i]->setImageSize(core::dimension2di(CARD_IMG_WIDTH * 0.6f, CARD_IMG_HEIGHT * 0.6f)); btnCardDisplay[i]->setImageSize(core::dimension2di(CARD_IMG_WIDTH * 0.6f, CARD_IMG_HEIGHT * 0.6f));
} }
scrDisplayList = env->addScrollBar(true, rect<s32>(30, 235, 650, 255), wCardDisplay, SCROLL_CARD_DISPLAY); scrDisplayList = env->addScrollBar(true, irr::core::rect<s32>(30, 235, 650, 255), wCardDisplay, SCROLL_CARD_DISPLAY);
btnDisplayOK = env->addButton(rect<s32>(300, 265, 380, 290), wCardDisplay, BUTTON_CARD_DISP_OK, dataManager.GetSysString(1211)); btnDisplayOK = env->addButton(irr::core::rect<s32>(300, 265, 380, 290), wCardDisplay, BUTTON_CARD_DISP_OK, dataManager.GetSysString(1211));
//announce number //announce number
wANNumber = env->addWindow(rect<s32>(550, 180, 780, 430), false, L""); wANNumber = env->addWindow(irr::core::rect<s32>(550, 180, 780, 430), false, L"");
wANNumber->getCloseButton()->setVisible(false); wANNumber->getCloseButton()->setVisible(false);
wANNumber->setVisible(false); wANNumber->setVisible(false);
cbANNumber = env->addComboBox(rect<s32>(40, 30, 190, 50), wANNumber, -1); cbANNumber = env->addComboBox(irr::core::rect<s32>(40, 30, 190, 50), wANNumber, -1);
cbANNumber->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); cbANNumber->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
for(int i = 0; i < 12; ++i) { for(int i = 0; i < 12; ++i) {
myswprintf(strbuf, L"%d", i + 1); myswprintf(strbuf, L"%d", i + 1);
btnANNumber[i] = env->addButton(rect<s32>(20 + 50 * (i % 4), 40 + 50 * (i / 4), 60 + 50 * (i % 4), 80 + 50 * (i / 4)), wANNumber, BUTTON_ANNUMBER_1 + i, strbuf); btnANNumber[i] = env->addButton(irr::core::rect<s32>(20 + 50 * (i % 4), 40 + 50 * (i / 4), 60 + 50 * (i % 4), 80 + 50 * (i / 4)), wANNumber, BUTTON_ANNUMBER_1 + i, strbuf);
btnANNumber[i]->setIsPushButton(true); btnANNumber[i]->setIsPushButton(true);
} }
btnANNumberOK = env->addButton(rect<s32>(80, 60, 150, 85), wANNumber, BUTTON_ANNUMBER_OK, dataManager.GetSysString(1211)); btnANNumberOK = env->addButton(irr::core::rect<s32>(80, 60, 150, 85), wANNumber, BUTTON_ANNUMBER_OK, dataManager.GetSysString(1211));
//announce card //announce card
wANCard = env->addWindow(rect<s32>(510, 120, 820, 420), false, L""); wANCard = env->addWindow(irr::core::rect<s32>(510, 120, 820, 420), false, L"");
wANCard->getCloseButton()->setVisible(false); wANCard->getCloseButton()->setVisible(false);
wANCard->setVisible(false); wANCard->setVisible(false);
ebANCard = env->addEditBox(L"", rect<s32>(20, 25, 290, 45), true, wANCard, EDITBOX_ANCARD); ebANCard = env->addEditBox(L"", irr::core::rect<s32>(20, 25, 290, 45), true, wANCard, EDITBOX_ANCARD);
ebANCard->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); ebANCard->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
lstANCard = env->addListBox(rect<s32>(20, 50, 290, 265), wANCard, LISTBOX_ANCARD, true); lstANCard = env->addListBox(irr::core::rect<s32>(20, 50, 290, 265), wANCard, LISTBOX_ANCARD, true);
btnANCardOK = env->addButton(rect<s32>(110, 270, 200, 295), wANCard, BUTTON_ANCARD_OK, dataManager.GetSysString(1211)); btnANCardOK = env->addButton(irr::core::rect<s32>(110, 270, 200, 295), wANCard, BUTTON_ANCARD_OK, dataManager.GetSysString(1211));
//announce attribute //announce attribute
wANAttribute = env->addWindow(rect<s32>(500, 200, 830, 285), false, dataManager.GetSysString(562)); wANAttribute = env->addWindow(irr::core::rect<s32>(500, 200, 830, 285), false, dataManager.GetSysString(562));
wANAttribute->getCloseButton()->setVisible(false); wANAttribute->getCloseButton()->setVisible(false);
wANAttribute->setVisible(false); wANAttribute->setVisible(false);
for(int filter = 0x1, i = 0; i < 7; filter <<= 1, ++i) for(int filter = 0x1, i = 0; i < 7; filter <<= 1, ++i)
chkAttribute[i] = env->addCheckBox(false, rect<s32>(10 + (i % 4) * 80, 25 + (i / 4) * 25, 90 + (i % 4) * 80, 50 + (i / 4) * 25), chkAttribute[i] = env->addCheckBox(false, irr::core::rect<s32>(10 + (i % 4) * 80, 25 + (i / 4) * 25, 90 + (i % 4) * 80, 50 + (i / 4) * 25),
wANAttribute, CHECK_ATTRIBUTE, dataManager.FormatAttribute(filter).c_str()); wANAttribute, CHECK_ATTRIBUTE, dataManager.FormatAttribute(filter).c_str());
//announce race //announce race
wANRace = env->addWindow(rect<s32>(480, 200, 850, 410), false, dataManager.GetSysString(563)); wANRace = env->addWindow(irr::core::rect<s32>(480, 200, 850, 410), false, dataManager.GetSysString(563));
wANRace->getCloseButton()->setVisible(false); wANRace->getCloseButton()->setVisible(false);
wANRace->setVisible(false); wANRace->setVisible(false);
for(int filter = 0x1, i = 0; i < RACES_COUNT; filter <<= 1, ++i) for(int filter = 0x1, i = 0; i < RACES_COUNT; filter <<= 1, ++i)
chkRace[i] = env->addCheckBox(false, rect<s32>(10 + (i % 4) * 90, 25 + (i / 4) * 25, 100 + (i % 4) * 90, 50 + (i / 4) * 25), chkRace[i] = env->addCheckBox(false, irr::core::rect<s32>(10 + (i % 4) * 90, 25 + (i / 4) * 25, 100 + (i % 4) * 90, 50 + (i / 4) * 25),
wANRace, CHECK_RACE, dataManager.FormatRace(filter).c_str()); wANRace, CHECK_RACE, dataManager.FormatRace(filter).c_str());
//selection hint //selection hint
stHintMsg = env->addStaticText(L"", rect<s32>(500, 60, 820, 90), true, false, 0, -1, false); stHintMsg = env->addStaticText(L"", irr::core::rect<s32>(500, 60, 820, 90), true, false, 0, -1, false);
stHintMsg->setBackgroundColor(0xc0ffffff); stHintMsg->setBackgroundColor(0xc0ffffff);
stHintMsg->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); stHintMsg->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
stHintMsg->setVisible(false); stHintMsg->setVisible(false);
//cmd menu //cmd menu
wCmdMenu = env->addWindow(rect<s32>(10, 10, 110, 179), false, L""); wCmdMenu = env->addWindow(irr::core::rect<s32>(10, 10, 110, 179), false, L"");
wCmdMenu->setDrawTitlebar(false); wCmdMenu->setDrawTitlebar(false);
wCmdMenu->setVisible(false); wCmdMenu->setVisible(false);
wCmdMenu->getCloseButton()->setVisible(false); wCmdMenu->getCloseButton()->setVisible(false);
btnActivate = env->addButton(rect<s32>(1, 1, 99, 21), wCmdMenu, BUTTON_CMD_ACTIVATE, dataManager.GetSysString(1150)); btnActivate = env->addButton(irr::core::rect<s32>(1, 1, 99, 21), wCmdMenu, BUTTON_CMD_ACTIVATE, dataManager.GetSysString(1150));
btnSummon = env->addButton(rect<s32>(1, 22, 99, 42), wCmdMenu, BUTTON_CMD_SUMMON, dataManager.GetSysString(1151)); btnSummon = env->addButton(irr::core::rect<s32>(1, 22, 99, 42), wCmdMenu, BUTTON_CMD_SUMMON, dataManager.GetSysString(1151));
btnSPSummon = env->addButton(rect<s32>(1, 43, 99, 63), wCmdMenu, BUTTON_CMD_SPSUMMON, dataManager.GetSysString(1152)); btnSPSummon = env->addButton(irr::core::rect<s32>(1, 43, 99, 63), wCmdMenu, BUTTON_CMD_SPSUMMON, dataManager.GetSysString(1152));
btnMSet = env->addButton(rect<s32>(1, 64, 99, 84), wCmdMenu, BUTTON_CMD_MSET, dataManager.GetSysString(1153)); btnMSet = env->addButton(irr::core::rect<s32>(1, 64, 99, 84), wCmdMenu, BUTTON_CMD_MSET, dataManager.GetSysString(1153));
btnSSet = env->addButton(rect<s32>(1, 85, 99, 105), wCmdMenu, BUTTON_CMD_SSET, dataManager.GetSysString(1153)); btnSSet = env->addButton(irr::core::rect<s32>(1, 85, 99, 105), wCmdMenu, BUTTON_CMD_SSET, dataManager.GetSysString(1153));
btnRepos = env->addButton(rect<s32>(1, 106, 99, 126), wCmdMenu, BUTTON_CMD_REPOS, dataManager.GetSysString(1154)); btnRepos = env->addButton(irr::core::rect<s32>(1, 106, 99, 126), wCmdMenu, BUTTON_CMD_REPOS, dataManager.GetSysString(1154));
btnAttack = env->addButton(rect<s32>(1, 127, 99, 147), wCmdMenu, BUTTON_CMD_ATTACK, dataManager.GetSysString(1157)); btnAttack = env->addButton(irr::core::rect<s32>(1, 127, 99, 147), wCmdMenu, BUTTON_CMD_ATTACK, dataManager.GetSysString(1157));
btnShowList = env->addButton(rect<s32>(1, 148, 99, 168), wCmdMenu, BUTTON_CMD_SHOWLIST, dataManager.GetSysString(1158)); btnShowList = env->addButton(irr::core::rect<s32>(1, 148, 99, 168), wCmdMenu, BUTTON_CMD_SHOWLIST, dataManager.GetSysString(1158));
btnOperation = env->addButton(rect<s32>(1, 169, 99, 189), wCmdMenu, BUTTON_CMD_ACTIVATE, dataManager.GetSysString(1161)); btnOperation = env->addButton(irr::core::rect<s32>(1, 169, 99, 189), wCmdMenu, BUTTON_CMD_ACTIVATE, dataManager.GetSysString(1161));
btnReset = env->addButton(rect<s32>(1, 190, 99, 210), wCmdMenu, BUTTON_CMD_RESET, dataManager.GetSysString(1162)); btnReset = env->addButton(irr::core::rect<s32>(1, 190, 99, 210), wCmdMenu, BUTTON_CMD_RESET, dataManager.GetSysString(1162));
//deck edit //deck edit
wDeckEdit = env->addStaticText(L"", rect<s32>(309, 5, 605, 130), true, false, 0, -1, true); wDeckEdit = env->addStaticText(L"", irr::core::rect<s32>(309, 5, 605, 130), true, false, 0, -1, true);
wDeckEdit->setVisible(false); wDeckEdit->setVisible(false);
btnManageDeck = env->addButton(rect<s32>(225, 5, 290, 30), wDeckEdit, BUTTON_MANAGE_DECK, dataManager.GetSysString(1328)); btnManageDeck = env->addButton(irr::core::rect<s32>(225, 5, 290, 30), wDeckEdit, BUTTON_MANAGE_DECK, dataManager.GetSysString(1328));
//deck manage //deck manage
wDeckManage = env->addWindow(rect<s32>(310, 135, 800, 465), false, dataManager.GetSysString(1460), 0, WINDOW_DECK_MANAGE); wDeckManage = env->addWindow(irr::core::rect<s32>(310, 135, 800, 465), false, dataManager.GetSysString(1460), 0, WINDOW_DECK_MANAGE);
wDeckManage->setVisible(false); wDeckManage->setVisible(false);
lstCategories = env->addListBox(rect<s32>(10, 30, 140, 320), wDeckManage, LISTBOX_CATEGORIES, true); lstCategories = env->addListBox(irr::core::rect<s32>(10, 30, 140, 320), wDeckManage, LISTBOX_CATEGORIES, true);
lstDecks = env->addListBox(rect<s32>(150, 30, 340, 320), wDeckManage, LISTBOX_DECKS, true); lstDecks = env->addListBox(irr::core::rect<s32>(150, 30, 340, 320), wDeckManage, LISTBOX_DECKS, true);
posY = 30; posY = 30;
btnNewCategory = env->addButton(rect<s32>(350, posY, 480, posY + 25), wDeckManage, BUTTON_NEW_CATEGORY, dataManager.GetSysString(1461)); btnNewCategory = env->addButton(irr::core::rect<s32>(350, posY, 480, posY + 25), wDeckManage, BUTTON_NEW_CATEGORY, dataManager.GetSysString(1461));
posY += 35; posY += 35;
btnRenameCategory = env->addButton(rect<s32>(350, posY, 480, posY + 25), wDeckManage, BUTTON_RENAME_CATEGORY, dataManager.GetSysString(1462)); btnRenameCategory = env->addButton(irr::core::rect<s32>(350, posY, 480, posY + 25), wDeckManage, BUTTON_RENAME_CATEGORY, dataManager.GetSysString(1462));
posY += 35; posY += 35;
btnDeleteCategory = env->addButton(rect<s32>(350, posY, 480, posY + 25), wDeckManage, BUTTON_DELETE_CATEGORY, dataManager.GetSysString(1463)); btnDeleteCategory = env->addButton(irr::core::rect<s32>(350, posY, 480, posY + 25), wDeckManage, BUTTON_DELETE_CATEGORY, dataManager.GetSysString(1463));
posY += 35; posY += 35;
btnNewDeck = env->addButton(rect<s32>(350, posY, 480, posY + 25), wDeckManage, BUTTON_NEW_DECK, dataManager.GetSysString(1464)); btnNewDeck = env->addButton(irr::core::rect<s32>(350, posY, 480, posY + 25), wDeckManage, BUTTON_NEW_DECK, dataManager.GetSysString(1464));
posY += 35; posY += 35;
btnRenameDeck = env->addButton(rect<s32>(350, posY, 480, posY + 25), wDeckManage, BUTTON_RENAME_DECK, dataManager.GetSysString(1465)); btnRenameDeck = env->addButton(irr::core::rect<s32>(350, posY, 480, posY + 25), wDeckManage, BUTTON_RENAME_DECK, dataManager.GetSysString(1465));
posY += 35; posY += 35;
btnDMDeleteDeck = env->addButton(rect<s32>(350, posY, 480, posY + 25), wDeckManage, BUTTON_DELETE_DECK_DM, dataManager.GetSysString(1466)); btnDMDeleteDeck = env->addButton(irr::core::rect<s32>(350, posY, 480, posY + 25), wDeckManage, BUTTON_DELETE_DECK_DM, dataManager.GetSysString(1466));
posY += 35; posY += 35;
btnMoveDeck = env->addButton(rect<s32>(350, posY, 480, posY + 25), wDeckManage, BUTTON_MOVE_DECK, dataManager.GetSysString(1467)); btnMoveDeck = env->addButton(irr::core::rect<s32>(350, posY, 480, posY + 25), wDeckManage, BUTTON_MOVE_DECK, dataManager.GetSysString(1467));
posY += 35; posY += 35;
btnCopyDeck = env->addButton(rect<s32>(350, posY, 480, posY + 25), wDeckManage, BUTTON_COPY_DECK, dataManager.GetSysString(1468)); btnCopyDeck = env->addButton(irr::core::rect<s32>(350, posY, 480, posY + 25), wDeckManage, BUTTON_COPY_DECK, dataManager.GetSysString(1468));
//deck manage query //deck manage query
wDMQuery = env->addWindow(rect<s32>(400, 200, 710, 320), false, dataManager.GetSysString(1460)); wDMQuery = env->addWindow(irr::core::rect<s32>(400, 200, 710, 320), false, dataManager.GetSysString(1460));
wDMQuery->getCloseButton()->setVisible(false); wDMQuery->getCloseButton()->setVisible(false);
wDMQuery->setVisible(false); wDMQuery->setVisible(false);
stDMMessage = env->addStaticText(L"", rect<s32>(20, 25, 290, 45), false, false, wDMQuery); stDMMessage = env->addStaticText(L"", irr::core::rect<s32>(20, 25, 290, 45), false, false, wDMQuery);
stDMMessage2 = env->addStaticText(L"", rect<s32>(20, 50, 290, 70), false, false, wDMQuery, -1, true); stDMMessage2 = env->addStaticText(L"", irr::core::rect<s32>(20, 50, 290, 70), false, false, wDMQuery, -1, true);
stDMMessage2->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); stDMMessage2->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
ebDMName = env->addEditBox(L"", rect<s32>(20, 50, 290, 70), true, wDMQuery, -1); ebDMName = env->addEditBox(L"", irr::core::rect<s32>(20, 50, 290, 70), true, wDMQuery, -1);
ebDMName->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); ebDMName->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
cbDMCategory = env->addComboBox(rect<s32>(20, 50, 290, 70), wDMQuery, -1); cbDMCategory = env->addComboBox(irr::core::rect<s32>(20, 50, 290, 70), wDMQuery, -1);
stDMMessage2->setVisible(false); stDMMessage2->setVisible(false);
ebDMName->setVisible(false); ebDMName->setVisible(false);
cbDMCategory->setVisible(false); cbDMCategory->setVisible(false);
cbDMCategory->setMaxSelectionRows(10); cbDMCategory->setMaxSelectionRows(10);
btnDMOK = env->addButton(rect<s32>(70, 80, 140, 105), wDMQuery, BUTTON_DM_OK, dataManager.GetSysString(1211)); btnDMOK = env->addButton(irr::core::rect<s32>(70, 80, 140, 105), wDMQuery, BUTTON_DM_OK, dataManager.GetSysString(1211));
btnDMCancel = env->addButton(rect<s32>(170, 80, 240, 105), wDMQuery, BUTTON_DM_CANCEL, dataManager.GetSysString(1212)); btnDMCancel = env->addButton(irr::core::rect<s32>(170, 80, 240, 105), wDMQuery, BUTTON_DM_CANCEL, dataManager.GetSysString(1212));
scrPackCards = env->addScrollBar(false, irr::core::recti(775, 161, 795, 629), 0, SCROLL_FILTER); scrPackCards = env->addScrollBar(false, irr::core::recti(775, 161, 795, 629), 0, SCROLL_FILTER);
scrPackCards->setLargeStep(1); scrPackCards->setLargeStep(1);
scrPackCards->setSmallStep(1); scrPackCards->setSmallStep(1);
scrPackCards->setVisible(false); scrPackCards->setVisible(false);
stDBCategory = env->addStaticText(dataManager.GetSysString(1300), rect<s32>(10, 9, 100, 29), false, false, wDeckEdit); stDBCategory = env->addStaticText(dataManager.GetSysString(1300), irr::core::rect<s32>(10, 9, 100, 29), false, false, wDeckEdit);
cbDBCategory = env->addComboBox(rect<s32>(80, 5, 220, 30), wDeckEdit, COMBOBOX_DBCATEGORY); cbDBCategory = env->addComboBox(irr::core::rect<s32>(80, 5, 220, 30), wDeckEdit, COMBOBOX_DBCATEGORY);
cbDBCategory->setMaxSelectionRows(15); cbDBCategory->setMaxSelectionRows(15);
stDeck = env->addStaticText(dataManager.GetSysString(1301), rect<s32>(10, 39, 100, 59), false, false, wDeckEdit); stDeck = env->addStaticText(dataManager.GetSysString(1301), irr::core::rect<s32>(10, 39, 100, 59), false, false, wDeckEdit);
cbDBDecks = env->addComboBox(rect<s32>(80, 35, 220, 60), wDeckEdit, COMBOBOX_DBDECKS); cbDBDecks = env->addComboBox(irr::core::rect<s32>(80, 35, 220, 60), wDeckEdit, COMBOBOX_DBDECKS);
cbDBDecks->setMaxSelectionRows(15); cbDBDecks->setMaxSelectionRows(15);
btnSaveDeck = env->addButton(rect<s32>(225, 35, 290, 60), wDeckEdit, BUTTON_SAVE_DECK, dataManager.GetSysString(1302)); btnSaveDeck = env->addButton(irr::core::rect<s32>(225, 35, 290, 60), wDeckEdit, BUTTON_SAVE_DECK, dataManager.GetSysString(1302));
ebDeckname = env->addEditBox(L"", rect<s32>(80, 65, 220, 90), true, wDeckEdit, -1); ebDeckname = env->addEditBox(L"", irr::core::rect<s32>(80, 65, 220, 90), true, wDeckEdit, -1);
ebDeckname->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); ebDeckname->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
btnSaveDeckAs = env->addButton(rect<s32>(225, 65, 290, 90), wDeckEdit, BUTTON_SAVE_DECK_AS, dataManager.GetSysString(1303)); btnSaveDeckAs = env->addButton(irr::core::rect<s32>(225, 65, 290, 90), wDeckEdit, BUTTON_SAVE_DECK_AS, dataManager.GetSysString(1303));
btnDeleteDeck = env->addButton(rect<s32>(225, 95, 290, 120), wDeckEdit, BUTTON_DELETE_DECK, dataManager.GetSysString(1308)); btnDeleteDeck = env->addButton(irr::core::rect<s32>(225, 95, 290, 120), wDeckEdit, BUTTON_DELETE_DECK, dataManager.GetSysString(1308));
btnShuffleDeck = env->addButton(rect<s32>(5, 99, 55, 120), wDeckEdit, BUTTON_SHUFFLE_DECK, dataManager.GetSysString(1307)); btnShuffleDeck = env->addButton(irr::core::rect<s32>(5, 99, 55, 120), wDeckEdit, BUTTON_SHUFFLE_DECK, dataManager.GetSysString(1307));
btnSortDeck = env->addButton(rect<s32>(60, 99, 110, 120), wDeckEdit, BUTTON_SORT_DECK, dataManager.GetSysString(1305)); btnSortDeck = env->addButton(irr::core::rect<s32>(60, 99, 110, 120), wDeckEdit, BUTTON_SORT_DECK, dataManager.GetSysString(1305));
btnClearDeck = env->addButton(rect<s32>(115, 99, 165, 120), wDeckEdit, BUTTON_CLEAR_DECK, dataManager.GetSysString(1304)); btnClearDeck = env->addButton(irr::core::rect<s32>(115, 99, 165, 120), wDeckEdit, BUTTON_CLEAR_DECK, dataManager.GetSysString(1304));
btnSideOK = env->addButton(rect<s32>(400, 40, 710, 80), 0, BUTTON_SIDE_OK, dataManager.GetSysString(1334)); btnSideOK = env->addButton(irr::core::rect<s32>(400, 40, 710, 80), 0, BUTTON_SIDE_OK, dataManager.GetSysString(1334));
btnSideOK->setVisible(false); btnSideOK->setVisible(false);
btnSideShuffle = env->addButton(rect<s32>(310, 100, 370, 130), 0, BUTTON_SHUFFLE_DECK, dataManager.GetSysString(1307)); btnSideShuffle = env->addButton(irr::core::rect<s32>(310, 100, 370, 130), 0, BUTTON_SHUFFLE_DECK, dataManager.GetSysString(1307));
btnSideShuffle->setVisible(false); btnSideShuffle->setVisible(false);
btnSideSort = env->addButton(rect<s32>(375, 100, 435, 130), 0, BUTTON_SORT_DECK, dataManager.GetSysString(1305)); btnSideSort = env->addButton(irr::core::rect<s32>(375, 100, 435, 130), 0, BUTTON_SORT_DECK, dataManager.GetSysString(1305));
btnSideSort->setVisible(false); btnSideSort->setVisible(false);
btnSideReload = env->addButton(rect<s32>(440, 100, 500, 130), 0, BUTTON_SIDE_RELOAD, dataManager.GetSysString(1309)); btnSideReload = env->addButton(irr::core::rect<s32>(440, 100, 500, 130), 0, BUTTON_SIDE_RELOAD, dataManager.GetSysString(1309));
btnSideReload->setVisible(false); btnSideReload->setVisible(false);
// //
scrFilter = env->addScrollBar(false, irr::core::recti(999, 161, 1019, 629), 0, SCROLL_FILTER); scrFilter = env->addScrollBar(false, irr::core::recti(999, 161, 1019, 629), 0, SCROLL_FILTER);
...@@ -727,26 +727,26 @@ bool Game::Initialize() { ...@@ -727,26 +727,26 @@ bool Game::Initialize() {
scrFilter->setSmallStep(1); scrFilter->setSmallStep(1);
scrFilter->setVisible(false); scrFilter->setVisible(false);
//sort type //sort type
wSort = env->addStaticText(L"", rect<s32>(930, 132, 1020, 156), true, false, 0, -1, true); wSort = env->addStaticText(L"", irr::core::rect<s32>(930, 132, 1020, 156), true, false, 0, -1, true);
cbSortType = env->addComboBox(rect<s32>(10, 2, 85, 22), wSort, COMBOBOX_SORTTYPE); cbSortType = env->addComboBox(irr::core::rect<s32>(10, 2, 85, 22), wSort, COMBOBOX_SORTTYPE);
cbSortType->setMaxSelectionRows(10); cbSortType->setMaxSelectionRows(10);
for(int i = 1370; i <= 1373; i++) for(int i = 1370; i <= 1373; i++)
cbSortType->addItem(dataManager.GetSysString(i)); cbSortType->addItem(dataManager.GetSysString(i));
wSort->setVisible(false); wSort->setVisible(false);
//filters //filters
wFilter = env->addStaticText(L"", rect<s32>(610, 5, 1020, 130), true, false, 0, -1, true); wFilter = env->addStaticText(L"", irr::core::rect<s32>(610, 5, 1020, 130), true, false, 0, -1, true);
wFilter->setVisible(false); wFilter->setVisible(false);
stCategory = env->addStaticText(dataManager.GetSysString(1311), rect<s32>(10, 2 + 25 / 6, 70, 22 + 25 / 6), false, false, wFilter); stCategory = env->addStaticText(dataManager.GetSysString(1311), irr::core::rect<s32>(10, 2 + 25 / 6, 70, 22 + 25 / 6), false, false, wFilter);
cbCardType = env->addComboBox(rect<s32>(60, 25 / 6, 120, 20 + 25 / 6), wFilter, COMBOBOX_MAINTYPE); cbCardType = env->addComboBox(irr::core::rect<s32>(60, 25 / 6, 120, 20 + 25 / 6), wFilter, COMBOBOX_MAINTYPE);
cbCardType->addItem(dataManager.GetSysString(1310)); cbCardType->addItem(dataManager.GetSysString(1310));
cbCardType->addItem(dataManager.GetSysString(1312)); cbCardType->addItem(dataManager.GetSysString(1312));
cbCardType->addItem(dataManager.GetSysString(1313)); cbCardType->addItem(dataManager.GetSysString(1313));
cbCardType->addItem(dataManager.GetSysString(1314)); cbCardType->addItem(dataManager.GetSysString(1314));
cbCardType2 = env->addComboBox(rect<s32>(125, 25 / 6, 195, 20 + 25 / 6), wFilter, COMBOBOX_SECONDTYPE); cbCardType2 = env->addComboBox(irr::core::rect<s32>(125, 25 / 6, 195, 20 + 25 / 6), wFilter, COMBOBOX_SECONDTYPE);
cbCardType2->setMaxSelectionRows(10); cbCardType2->setMaxSelectionRows(10);
cbCardType2->addItem(dataManager.GetSysString(1310), 0); cbCardType2->addItem(dataManager.GetSysString(1310), 0);
stLimit = env->addStaticText(dataManager.GetSysString(1315), rect<s32>(205, 2 + 25 / 6, 280, 22 + 25 / 6), false, false, wFilter); stLimit = env->addStaticText(dataManager.GetSysString(1315), irr::core::rect<s32>(205, 2 + 25 / 6, 280, 22 + 25 / 6), false, false, wFilter);
cbLimit = env->addComboBox(rect<s32>(260, 25 / 6, 390, 20 + 25 / 6), wFilter, COMBOBOX_LIMIT); cbLimit = env->addComboBox(irr::core::rect<s32>(260, 25 / 6, 390, 20 + 25 / 6), wFilter, COMBOBOX_LIMIT);
cbLimit->setMaxSelectionRows(10); cbLimit->setMaxSelectionRows(10);
cbLimit->addItem(dataManager.GetSysString(1310)); cbLimit->addItem(dataManager.GetSysString(1310));
cbLimit->addItem(dataManager.GetSysString(1316)); cbLimit->addItem(dataManager.GetSysString(1316));
...@@ -757,45 +757,45 @@ bool Game::Initialize() { ...@@ -757,45 +757,45 @@ bool Game::Initialize() {
cbLimit->addItem(dataManager.GetSysString(1483)); cbLimit->addItem(dataManager.GetSysString(1483));
cbLimit->addItem(dataManager.GetSysString(1484)); cbLimit->addItem(dataManager.GetSysString(1484));
cbLimit->addItem(dataManager.GetSysString(1485)); cbLimit->addItem(dataManager.GetSysString(1485));
stAttribute = env->addStaticText(dataManager.GetSysString(1319), rect<s32>(10, 22 + 50 / 6, 70, 42 + 50 / 6), false, false, wFilter); stAttribute = env->addStaticText(dataManager.GetSysString(1319), irr::core::rect<s32>(10, 22 + 50 / 6, 70, 42 + 50 / 6), false, false, wFilter);
cbAttribute = env->addComboBox(rect<s32>(60, 20 + 50 / 6, 195, 40 + 50 / 6), wFilter, COMBOBOX_ATTRIBUTE); cbAttribute = env->addComboBox(irr::core::rect<s32>(60, 20 + 50 / 6, 195, 40 + 50 / 6), wFilter, COMBOBOX_ATTRIBUTE);
cbAttribute->setMaxSelectionRows(10); cbAttribute->setMaxSelectionRows(10);
cbAttribute->addItem(dataManager.GetSysString(1310), 0); cbAttribute->addItem(dataManager.GetSysString(1310), 0);
for(int filter = 0x1; filter != 0x80; filter <<= 1) for(int filter = 0x1; filter != 0x80; filter <<= 1)
cbAttribute->addItem(dataManager.FormatAttribute(filter).c_str(), filter); cbAttribute->addItem(dataManager.FormatAttribute(filter).c_str(), filter);
stRace = env->addStaticText(dataManager.GetSysString(1321), rect<s32>(10, 42 + 75 / 6, 70, 62 + 75 / 6), false, false, wFilter); stRace = env->addStaticText(dataManager.GetSysString(1321), irr::core::rect<s32>(10, 42 + 75 / 6, 70, 62 + 75 / 6), false, false, wFilter);
cbRace = env->addComboBox(rect<s32>(60, 40 + 75 / 6, 195, 60 + 75 / 6), wFilter, COMBOBOX_RACE); cbRace = env->addComboBox(irr::core::rect<s32>(60, 40 + 75 / 6, 195, 60 + 75 / 6), wFilter, COMBOBOX_RACE);
cbRace->setMaxSelectionRows(10); cbRace->setMaxSelectionRows(10);
cbRace->addItem(dataManager.GetSysString(1310), 0); cbRace->addItem(dataManager.GetSysString(1310), 0);
for(int filter = 0x1; filter < (1 << RACES_COUNT); filter <<= 1) for(int filter = 0x1; filter < (1 << RACES_COUNT); filter <<= 1)
cbRace->addItem(dataManager.FormatRace(filter).c_str(), filter); cbRace->addItem(dataManager.FormatRace(filter).c_str(), filter);
stAttack = env->addStaticText(dataManager.GetSysString(1322), rect<s32>(205, 22 + 50 / 6, 280, 42 + 50 / 6), false, false, wFilter); stAttack = env->addStaticText(dataManager.GetSysString(1322), irr::core::rect<s32>(205, 22 + 50 / 6, 280, 42 + 50 / 6), false, false, wFilter);
ebAttack = env->addEditBox(L"", rect<s32>(260, 20 + 50 / 6, 340, 40 + 50 / 6), true, wFilter, EDITBOX_INPUTS); ebAttack = env->addEditBox(L"", irr::core::rect<s32>(260, 20 + 50 / 6, 340, 40 + 50 / 6), true, wFilter, EDITBOX_INPUTS);
ebAttack->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); ebAttack->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
stDefense = env->addStaticText(dataManager.GetSysString(1323), rect<s32>(205, 42 + 75 / 6, 280, 62 + 75 / 6), false, false, wFilter); stDefense = env->addStaticText(dataManager.GetSysString(1323), irr::core::rect<s32>(205, 42 + 75 / 6, 280, 62 + 75 / 6), false, false, wFilter);
ebDefense = env->addEditBox(L"", rect<s32>(260, 40 + 75 / 6, 340, 60 + 75 / 6), true, wFilter, EDITBOX_INPUTS); ebDefense = env->addEditBox(L"", irr::core::rect<s32>(260, 40 + 75 / 6, 340, 60 + 75 / 6), true, wFilter, EDITBOX_INPUTS);
ebDefense->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); ebDefense->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
stStar = env->addStaticText(dataManager.GetSysString(1324), rect<s32>(10, 62 + 100 / 6, 80, 82 + 100 / 6), false, false, wFilter); stStar = env->addStaticText(dataManager.GetSysString(1324), irr::core::rect<s32>(10, 62 + 100 / 6, 80, 82 + 100 / 6), false, false, wFilter);
ebStar = env->addEditBox(L"", rect<s32>(60, 60 + 100 / 6, 100, 80 + 100 / 6), true, wFilter, EDITBOX_INPUTS); ebStar = env->addEditBox(L"", irr::core::rect<s32>(60, 60 + 100 / 6, 100, 80 + 100 / 6), true, wFilter, EDITBOX_INPUTS);
ebStar->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); ebStar->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
stScale = env->addStaticText(dataManager.GetSysString(1336), rect<s32>(101, 62 + 100 / 6, 150, 82 + 100 / 6), false, false, wFilter); stScale = env->addStaticText(dataManager.GetSysString(1336), irr::core::rect<s32>(101, 62 + 100 / 6, 150, 82 + 100 / 6), false, false, wFilter);
ebScale = env->addEditBox(L"", rect<s32>(150, 60 + 100 / 6, 195, 80 + 100 / 6), true, wFilter, EDITBOX_INPUTS); ebScale = env->addEditBox(L"", irr::core::rect<s32>(150, 60 + 100 / 6, 195, 80 + 100 / 6), true, wFilter, EDITBOX_INPUTS);
ebScale->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); ebScale->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
stSearch = env->addStaticText(dataManager.GetSysString(1325), rect<s32>(205, 62 + 100 / 6, 280, 82 + 100 / 6), false, false, wFilter); stSearch = env->addStaticText(dataManager.GetSysString(1325), irr::core::rect<s32>(205, 62 + 100 / 6, 280, 82 + 100 / 6), false, false, wFilter);
ebCardName = env->addEditBox(L"", rect<s32>(260, 60 + 100 / 6, 390, 80 + 100 / 6), true, wFilter, EDITBOX_KEYWORD); ebCardName = env->addEditBox(L"", irr::core::rect<s32>(260, 60 + 100 / 6, 390, 80 + 100 / 6), true, wFilter, EDITBOX_KEYWORD);
ebCardName->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); ebCardName->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
btnEffectFilter = env->addButton(rect<s32>(345, 20 + 50 / 6, 390, 60 + 75 / 6), wFilter, BUTTON_EFFECT_FILTER, dataManager.GetSysString(1326)); btnEffectFilter = env->addButton(irr::core::rect<s32>(345, 20 + 50 / 6, 390, 60 + 75 / 6), wFilter, BUTTON_EFFECT_FILTER, dataManager.GetSysString(1326));
btnStartFilter = env->addButton(rect<s32>(205, 80 + 125 / 6, 390, 100 + 125 / 6), wFilter, BUTTON_START_FILTER, dataManager.GetSysString(1327)); btnStartFilter = env->addButton(irr::core::rect<s32>(205, 80 + 125 / 6, 390, 100 + 125 / 6), wFilter, BUTTON_START_FILTER, dataManager.GetSysString(1327));
if(gameConf.separate_clear_button) { if(gameConf.separate_clear_button) {
btnStartFilter->setRelativePosition(rect<s32>(260, 80 + 125 / 6, 390, 100 + 125 / 6)); btnStartFilter->setRelativePosition(irr::core::rect<s32>(260, 80 + 125 / 6, 390, 100 + 125 / 6));
btnClearFilter = env->addButton(rect<s32>(205, 80 + 125 / 6, 255, 100 + 125 / 6), wFilter, BUTTON_CLEAR_FILTER, dataManager.GetSysString(1304)); btnClearFilter = env->addButton(irr::core::rect<s32>(205, 80 + 125 / 6, 255, 100 + 125 / 6), wFilter, BUTTON_CLEAR_FILTER, dataManager.GetSysString(1304));
} }
wCategories = env->addWindow(rect<s32>(600, 60, 1000, 305), false, L""); wCategories = env->addWindow(irr::core::rect<s32>(600, 60, 1000, 305), false, L"");
wCategories->getCloseButton()->setVisible(false); wCategories->getCloseButton()->setVisible(false);
wCategories->setDrawTitlebar(false); wCategories->setDrawTitlebar(false);
wCategories->setDraggable(false); wCategories->setDraggable(false);
wCategories->setVisible(false); wCategories->setVisible(false);
btnCategoryOK = env->addButton(rect<s32>(150, 210, 250, 235), wCategories, BUTTON_CATEGORY_OK, dataManager.GetSysString(1211)); btnCategoryOK = env->addButton(irr::core::rect<s32>(150, 210, 250, 235), wCategories, BUTTON_CATEGORY_OK, dataManager.GetSysString(1211));
int catewidth = 0; int catewidth = 0;
for(int i = 0; i < 32; ++i) { for(int i = 0; i < 32; ++i) {
irr::core::dimension2d<unsigned int> dtxt = guiFont->getDimension(dataManager.GetSysString(1100 + i)); irr::core::dimension2d<unsigned int> dtxt = guiFont->getDimension(dataManager.GetSysString(1100 + i));
...@@ -805,10 +805,10 @@ bool Game::Initialize() { ...@@ -805,10 +805,10 @@ bool Game::Initialize() {
for(int i = 0; i < 32; ++i) for(int i = 0; i < 32; ++i)
chkCategory[i] = env->addCheckBox(false, irr::core::recti(10 + (i % 4) * catewidth, 5 + (i / 4) * 25, 10 + (i % 4 + 1) * catewidth, 5 + (i / 4 + 1) * 25), wCategories, -1, dataManager.GetSysString(1100 + i)); chkCategory[i] = env->addCheckBox(false, irr::core::recti(10 + (i % 4) * catewidth, 5 + (i / 4) * 25, 10 + (i % 4 + 1) * catewidth, 5 + (i / 4 + 1) * 25), wCategories, -1, dataManager.GetSysString(1100 + i));
int wcatewidth = catewidth * 4 + 16; int wcatewidth = catewidth * 4 + 16;
wCategories->setRelativePosition(rect<s32>(1000 - wcatewidth, 60, 1000, 305)); wCategories->setRelativePosition(irr::core::rect<s32>(1000 - wcatewidth, 60, 1000, 305));
btnCategoryOK->setRelativePosition(irr::core::recti(wcatewidth / 2 - 50, 210, wcatewidth / 2 + 50, 235)); btnCategoryOK->setRelativePosition(irr::core::recti(wcatewidth / 2 - 50, 210, wcatewidth / 2 + 50, 235));
btnMarksFilter = env->addButton(rect<s32>(60, 80 + 125 / 6, 195, 100 + 125 / 6), wFilter, BUTTON_MARKS_FILTER, dataManager.GetSysString(1374)); btnMarksFilter = env->addButton(irr::core::rect<s32>(60, 80 + 125 / 6, 195, 100 + 125 / 6), wFilter, BUTTON_MARKS_FILTER, dataManager.GetSysString(1374));
wLinkMarks = env->addWindow(rect<s32>(700, 30, 820, 150), false, L""); wLinkMarks = env->addWindow(irr::core::rect<s32>(700, 30, 820, 150), false, L"");
wLinkMarks->getCloseButton()->setVisible(false); wLinkMarks->getCloseButton()->setVisible(false);
wLinkMarks->setDrawTitlebar(false); wLinkMarks->setDrawTitlebar(false);
wLinkMarks->setDraggable(false); wLinkMarks->setDraggable(false);
...@@ -825,94 +825,94 @@ bool Game::Initialize() { ...@@ -825,94 +825,94 @@ bool Game::Initialize() {
for(int i=0;i<8;i++) for(int i=0;i<8;i++)
btnMark[i]->setIsPushButton(true); btnMark[i]->setIsPushButton(true);
//replay window //replay window
wReplay = env->addWindow(rect<s32>(220, 100, 800, 520), false, dataManager.GetSysString(1202)); wReplay = env->addWindow(irr::core::rect<s32>(220, 100, 800, 520), false, dataManager.GetSysString(1202));
wReplay->getCloseButton()->setVisible(false); wReplay->getCloseButton()->setVisible(false);
wReplay->setVisible(false); wReplay->setVisible(false);
lstReplayList = env->addListBox(rect<s32>(10, 30, 350, 400), wReplay, LISTBOX_REPLAY_LIST, true); lstReplayList = env->addListBox(irr::core::rect<s32>(10, 30, 350, 400), wReplay, LISTBOX_REPLAY_LIST, true);
lstReplayList->setItemHeight(18); lstReplayList->setItemHeight(18);
btnLoadReplay = env->addButton(rect<s32>(470, 355, 570, 380), wReplay, BUTTON_LOAD_REPLAY, dataManager.GetSysString(1348)); btnLoadReplay = env->addButton(irr::core::rect<s32>(470, 355, 570, 380), wReplay, BUTTON_LOAD_REPLAY, dataManager.GetSysString(1348));
btnDeleteReplay = env->addButton(rect<s32>(360, 355, 460, 380), wReplay, BUTTON_DELETE_REPLAY, dataManager.GetSysString(1361)); btnDeleteReplay = env->addButton(irr::core::rect<s32>(360, 355, 460, 380), wReplay, BUTTON_DELETE_REPLAY, dataManager.GetSysString(1361));
btnRenameReplay = env->addButton(rect<s32>(360, 385, 460, 410), wReplay, BUTTON_RENAME_REPLAY, dataManager.GetSysString(1362)); btnRenameReplay = env->addButton(irr::core::rect<s32>(360, 385, 460, 410), wReplay, BUTTON_RENAME_REPLAY, dataManager.GetSysString(1362));
btnReplayCancel = env->addButton(rect<s32>(470, 385, 570, 410), wReplay, BUTTON_CANCEL_REPLAY, dataManager.GetSysString(1347)); btnReplayCancel = env->addButton(irr::core::rect<s32>(470, 385, 570, 410), wReplay, BUTTON_CANCEL_REPLAY, dataManager.GetSysString(1347));
btnExportDeck = env->addButton(rect<s32>(470, 325, 570, 350), wReplay, BUTTON_EXPORT_DECK, dataManager.GetSysString(1369)); btnExportDeck = env->addButton(irr::core::rect<s32>(470, 325, 570, 350), wReplay, BUTTON_EXPORT_DECK, dataManager.GetSysString(1369));
env->addStaticText(dataManager.GetSysString(1349), rect<s32>(360, 30, 570, 50), false, true, wReplay); env->addStaticText(dataManager.GetSysString(1349), irr::core::rect<s32>(360, 30, 570, 50), false, true, wReplay);
stReplayInfo = env->addStaticText(L"", rect<s32>(360, 60, 570, 320), false, true, wReplay); stReplayInfo = env->addStaticText(L"", irr::core::rect<s32>(360, 60, 570, 320), false, true, wReplay);
env->addStaticText(dataManager.GetSysString(1353), rect<s32>(360, 275, 570, 295), false, true, wReplay); env->addStaticText(dataManager.GetSysString(1353), irr::core::rect<s32>(360, 275, 570, 295), false, true, wReplay);
ebRepStartTurn = env->addEditBox(L"", rect<s32>(360, 300, 460, 320), true, wReplay, -1); ebRepStartTurn = env->addEditBox(L"", irr::core::rect<s32>(360, 300, 460, 320), true, wReplay, -1);
ebRepStartTurn->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); ebRepStartTurn->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
//single play window //single play window
wSinglePlay = env->addWindow(rect<s32>(220, 100, 800, 520), false, dataManager.GetSysString(1201)); wSinglePlay = env->addWindow(irr::core::rect<s32>(220, 100, 800, 520), false, dataManager.GetSysString(1201));
wSinglePlay->getCloseButton()->setVisible(false); wSinglePlay->getCloseButton()->setVisible(false);
wSinglePlay->setVisible(false); wSinglePlay->setVisible(false);
irr::gui::IGUITabControl* wSingle = env->addTabControl(rect<s32>(0, 20, 579, 419), wSinglePlay, true); irr::gui::IGUITabControl* wSingle = env->addTabControl(irr::core::rect<s32>(0, 20, 579, 419), wSinglePlay, true);
if(gameConf.enable_bot_mode) { if(gameConf.enable_bot_mode) {
irr::gui::IGUITab* tabBot = wSingle->addTab(dataManager.GetSysString(1380)); irr::gui::IGUITab* tabBot = wSingle->addTab(dataManager.GetSysString(1380));
lstBotList = env->addListBox(rect<s32>(10, 10, 350, 350), tabBot, LISTBOX_BOT_LIST, true); lstBotList = env->addListBox(irr::core::rect<s32>(10, 10, 350, 350), tabBot, LISTBOX_BOT_LIST, true);
lstBotList->setItemHeight(18); lstBotList->setItemHeight(18);
btnStartBot = env->addButton(rect<s32>(459, 301, 569, 326), tabBot, BUTTON_BOT_START, dataManager.GetSysString(1211)); btnStartBot = env->addButton(irr::core::rect<s32>(459, 301, 569, 326), tabBot, BUTTON_BOT_START, dataManager.GetSysString(1211));
btnBotCancel = env->addButton(rect<s32>(459, 331, 569, 356), tabBot, BUTTON_CANCEL_SINGLEPLAY, dataManager.GetSysString(1210)); btnBotCancel = env->addButton(irr::core::rect<s32>(459, 331, 569, 356), tabBot, BUTTON_CANCEL_SINGLEPLAY, dataManager.GetSysString(1210));
env->addStaticText(dataManager.GetSysString(1382), rect<s32>(360, 10, 550, 30), false, true, tabBot); env->addStaticText(dataManager.GetSysString(1382), irr::core::rect<s32>(360, 10, 550, 30), false, true, tabBot);
stBotInfo = env->addStaticText(L"", rect<s32>(360, 40, 560, 160), false, true, tabBot); stBotInfo = env->addStaticText(L"", irr::core::rect<s32>(360, 40, 560, 160), false, true, tabBot);
cbBotDeckCategory = env->addComboBox(rect<s32>(360, 95, 560, 120), tabBot, COMBOBOX_BOT_DECKCATEGORY); cbBotDeckCategory = env->addComboBox(irr::core::rect<s32>(360, 95, 560, 120), tabBot, COMBOBOX_BOT_DECKCATEGORY);
cbBotDeckCategory->setMaxSelectionRows(6); cbBotDeckCategory->setMaxSelectionRows(6);
cbBotDeckCategory->setVisible(false); cbBotDeckCategory->setVisible(false);
cbBotDeck = env->addComboBox(rect<s32>(360, 130, 560, 155), tabBot); cbBotDeck = env->addComboBox(irr::core::rect<s32>(360, 130, 560, 155), tabBot);
cbBotDeck->setMaxSelectionRows(6); cbBotDeck->setMaxSelectionRows(6);
cbBotDeck->setVisible(false); cbBotDeck->setVisible(false);
cbBotRule = env->addComboBox(rect<s32>(360, 165, 560, 190), tabBot, COMBOBOX_BOT_RULE); cbBotRule = env->addComboBox(irr::core::rect<s32>(360, 165, 560, 190), tabBot, COMBOBOX_BOT_RULE);
cbBotRule->addItem(dataManager.GetSysString(1262)); cbBotRule->addItem(dataManager.GetSysString(1262));
cbBotRule->addItem(dataManager.GetSysString(1263)); cbBotRule->addItem(dataManager.GetSysString(1263));
cbBotRule->addItem(dataManager.GetSysString(1264)); cbBotRule->addItem(dataManager.GetSysString(1264));
cbBotRule->setSelected(gameConf.default_rule - 3); cbBotRule->setSelected(gameConf.default_rule - 3);
chkBotHand = env->addCheckBox(false, rect<s32>(360, 200, 560, 220), tabBot, -1, dataManager.GetSysString(1384)); chkBotHand = env->addCheckBox(false, irr::core::rect<s32>(360, 200, 560, 220), tabBot, -1, dataManager.GetSysString(1384));
chkBotNoCheckDeck = env->addCheckBox(false, rect<s32>(360, 230, 560, 250), tabBot, -1, dataManager.GetSysString(1229)); chkBotNoCheckDeck = env->addCheckBox(false, irr::core::rect<s32>(360, 230, 560, 250), tabBot, -1, dataManager.GetSysString(1229));
chkBotNoShuffleDeck = env->addCheckBox(false, rect<s32>(360, 260, 560, 280), tabBot, -1, dataManager.GetSysString(1230)); chkBotNoShuffleDeck = env->addCheckBox(false, irr::core::rect<s32>(360, 260, 560, 280), tabBot, -1, dataManager.GetSysString(1230));
} else { // avoid null pointer } else { // avoid null pointer
btnStartBot = env->addButton(rect<s32>(0, 0, 0, 0), wSinglePlay); btnStartBot = env->addButton(irr::core::rect<s32>(0, 0, 0, 0), wSinglePlay);
btnBotCancel = env->addButton(rect<s32>(0, 0, 0, 0), wSinglePlay); btnBotCancel = env->addButton(irr::core::rect<s32>(0, 0, 0, 0), wSinglePlay);
btnStartBot->setVisible(false); btnStartBot->setVisible(false);
btnBotCancel->setVisible(false); btnBotCancel->setVisible(false);
} }
irr::gui::IGUITab* tabSingle = wSingle->addTab(dataManager.GetSysString(1381)); irr::gui::IGUITab* tabSingle = wSingle->addTab(dataManager.GetSysString(1381));
lstSinglePlayList = env->addListBox(rect<s32>(10, 10, 350, 350), tabSingle, LISTBOX_SINGLEPLAY_LIST, true); lstSinglePlayList = env->addListBox(irr::core::rect<s32>(10, 10, 350, 350), tabSingle, LISTBOX_SINGLEPLAY_LIST, true);
lstSinglePlayList->setItemHeight(18); lstSinglePlayList->setItemHeight(18);
btnLoadSinglePlay = env->addButton(rect<s32>(459, 301, 569, 326), tabSingle, BUTTON_LOAD_SINGLEPLAY, dataManager.GetSysString(1211)); btnLoadSinglePlay = env->addButton(irr::core::rect<s32>(459, 301, 569, 326), tabSingle, BUTTON_LOAD_SINGLEPLAY, dataManager.GetSysString(1211));
btnSinglePlayCancel = env->addButton(rect<s32>(459, 331, 569, 356), tabSingle, BUTTON_CANCEL_SINGLEPLAY, dataManager.GetSysString(1210)); btnSinglePlayCancel = env->addButton(irr::core::rect<s32>(459, 331, 569, 356), tabSingle, BUTTON_CANCEL_SINGLEPLAY, dataManager.GetSysString(1210));
env->addStaticText(dataManager.GetSysString(1352), rect<s32>(360, 10, 550, 30), false, true, tabSingle); env->addStaticText(dataManager.GetSysString(1352), irr::core::rect<s32>(360, 10, 550, 30), false, true, tabSingle);
stSinglePlayInfo = env->addStaticText(L"", rect<s32>(360, 40, 560, 160), false, true, tabSingle); stSinglePlayInfo = env->addStaticText(L"", irr::core::rect<s32>(360, 40, 560, 160), false, true, tabSingle);
chkSinglePlayReturnDeckTop = env->addCheckBox(false, rect<s32>(360, 260, 560, 280), tabSingle, -1, dataManager.GetSysString(1238)); chkSinglePlayReturnDeckTop = env->addCheckBox(false, irr::core::rect<s32>(360, 260, 560, 280), tabSingle, -1, dataManager.GetSysString(1238));
//replay save //replay save
wReplaySave = env->addWindow(rect<s32>(510, 200, 820, 320), false, dataManager.GetSysString(1340)); wReplaySave = env->addWindow(irr::core::rect<s32>(510, 200, 820, 320), false, dataManager.GetSysString(1340));
wReplaySave->getCloseButton()->setVisible(false); wReplaySave->getCloseButton()->setVisible(false);
wReplaySave->setVisible(false); wReplaySave->setVisible(false);
env->addStaticText(dataManager.GetSysString(1342), rect<s32>(20, 25, 290, 45), false, false, wReplaySave); env->addStaticText(dataManager.GetSysString(1342), irr::core::rect<s32>(20, 25, 290, 45), false, false, wReplaySave);
ebRSName = env->addEditBox(L"", rect<s32>(20, 50, 290, 70), true, wReplaySave, -1); ebRSName = env->addEditBox(L"", irr::core::rect<s32>(20, 50, 290, 70), true, wReplaySave, -1);
ebRSName->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); ebRSName->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
btnRSYes = env->addButton(rect<s32>(70, 80, 140, 105), wReplaySave, BUTTON_REPLAY_SAVE, dataManager.GetSysString(1341)); btnRSYes = env->addButton(irr::core::rect<s32>(70, 80, 140, 105), wReplaySave, BUTTON_REPLAY_SAVE, dataManager.GetSysString(1341));
btnRSNo = env->addButton(rect<s32>(170, 80, 240, 105), wReplaySave, BUTTON_REPLAY_CANCEL, dataManager.GetSysString(1212)); btnRSNo = env->addButton(irr::core::rect<s32>(170, 80, 240, 105), wReplaySave, BUTTON_REPLAY_CANCEL, dataManager.GetSysString(1212));
//replay control //replay control
wReplayControl = env->addStaticText(L"", rect<s32>(205, 118, 295, 273), true, false, 0, -1, true); wReplayControl = env->addStaticText(L"", irr::core::rect<s32>(205, 118, 295, 273), true, false, 0, -1, true);
wReplayControl->setVisible(false); wReplayControl->setVisible(false);
btnReplayStart = env->addButton(rect<s32>(5, 5, 85, 25), wReplayControl, BUTTON_REPLAY_START, dataManager.GetSysString(1343)); btnReplayStart = env->addButton(irr::core::rect<s32>(5, 5, 85, 25), wReplayControl, BUTTON_REPLAY_START, dataManager.GetSysString(1343));
btnReplayPause = env->addButton(rect<s32>(5, 30, 85, 50), wReplayControl, BUTTON_REPLAY_PAUSE, dataManager.GetSysString(1344)); btnReplayPause = env->addButton(irr::core::rect<s32>(5, 30, 85, 50), wReplayControl, BUTTON_REPLAY_PAUSE, dataManager.GetSysString(1344));
btnReplayStep = env->addButton(rect<s32>(5, 55, 85, 75), wReplayControl, BUTTON_REPLAY_STEP, dataManager.GetSysString(1345)); btnReplayStep = env->addButton(irr::core::rect<s32>(5, 55, 85, 75), wReplayControl, BUTTON_REPLAY_STEP, dataManager.GetSysString(1345));
btnReplayUndo = env->addButton(rect<s32>(5, 80, 85, 100), wReplayControl, BUTTON_REPLAY_UNDO, dataManager.GetSysString(1360)); btnReplayUndo = env->addButton(irr::core::rect<s32>(5, 80, 85, 100), wReplayControl, BUTTON_REPLAY_UNDO, dataManager.GetSysString(1360));
btnReplaySwap = env->addButton(rect<s32>(5, 105, 85, 125), wReplayControl, BUTTON_REPLAY_SWAP, dataManager.GetSysString(1346)); btnReplaySwap = env->addButton(irr::core::rect<s32>(5, 105, 85, 125), wReplayControl, BUTTON_REPLAY_SWAP, dataManager.GetSysString(1346));
btnReplayExit = env->addButton(rect<s32>(5, 130, 85, 150), wReplayControl, BUTTON_REPLAY_EXIT, dataManager.GetSysString(1347)); btnReplayExit = env->addButton(irr::core::rect<s32>(5, 130, 85, 150), wReplayControl, BUTTON_REPLAY_EXIT, dataManager.GetSysString(1347));
//chat //chat
wChat = env->addWindow(rect<s32>(305, 615, 1020, 640), false, L""); wChat = env->addWindow(irr::core::rect<s32>(305, 615, 1020, 640), false, L"");
wChat->getCloseButton()->setVisible(false); wChat->getCloseButton()->setVisible(false);
wChat->setDraggable(false); wChat->setDraggable(false);
wChat->setDrawTitlebar(false); wChat->setDrawTitlebar(false);
wChat->setVisible(false); wChat->setVisible(false);
ebChatInput = env->addEditBox(L"", rect<s32>(3, 2, 710, 22), true, wChat, EDITBOX_CHAT); ebChatInput = env->addEditBox(L"", irr::core::rect<s32>(3, 2, 710, 22), true, wChat, EDITBOX_CHAT);
//swap //swap
btnSpectatorSwap = env->addButton(rect<s32>(205, 100, 295, 135), 0, BUTTON_REPLAY_SWAP, dataManager.GetSysString(1346)); btnSpectatorSwap = env->addButton(irr::core::rect<s32>(205, 100, 295, 135), 0, BUTTON_REPLAY_SWAP, dataManager.GetSysString(1346));
btnSpectatorSwap->setVisible(false); btnSpectatorSwap->setVisible(false);
//chain buttons //chain buttons
btnChainIgnore = env->addButton(rect<s32>(205, 100, 295, 135), 0, BUTTON_CHAIN_IGNORE, dataManager.GetSysString(1292)); btnChainIgnore = env->addButton(irr::core::rect<s32>(205, 100, 295, 135), 0, BUTTON_CHAIN_IGNORE, dataManager.GetSysString(1292));
btnChainAlways = env->addButton(rect<s32>(205, 140, 295, 175), 0, BUTTON_CHAIN_ALWAYS, dataManager.GetSysString(1293)); btnChainAlways = env->addButton(irr::core::rect<s32>(205, 140, 295, 175), 0, BUTTON_CHAIN_ALWAYS, dataManager.GetSysString(1293));
btnChainWhenAvail = env->addButton(rect<s32>(205, 180, 295, 215), 0, BUTTON_CHAIN_WHENAVAIL, dataManager.GetSysString(1294)); btnChainWhenAvail = env->addButton(irr::core::rect<s32>(205, 180, 295, 215), 0, BUTTON_CHAIN_WHENAVAIL, dataManager.GetSysString(1294));
btnChainIgnore->setIsPushButton(true); btnChainIgnore->setIsPushButton(true);
btnChainAlways->setIsPushButton(true); btnChainAlways->setIsPushButton(true);
btnChainWhenAvail->setIsPushButton(true); btnChainWhenAvail->setIsPushButton(true);
...@@ -920,38 +920,38 @@ bool Game::Initialize() { ...@@ -920,38 +920,38 @@ bool Game::Initialize() {
btnChainAlways->setVisible(false); btnChainAlways->setVisible(false);
btnChainWhenAvail->setVisible(false); btnChainWhenAvail->setVisible(false);
//shuffle //shuffle
btnShuffle = env->addButton(rect<s32>(205, 230, 295, 265), 0, BUTTON_CMD_SHUFFLE, dataManager.GetSysString(1297)); btnShuffle = env->addButton(irr::core::rect<s32>(205, 230, 295, 265), 0, BUTTON_CMD_SHUFFLE, dataManager.GetSysString(1297));
btnShuffle->setVisible(false); btnShuffle->setVisible(false);
//cancel or finish //cancel or finish
btnCancelOrFinish = env->addButton(rect<s32>(205, 230, 295, 265), 0, BUTTON_CANCEL_OR_FINISH, dataManager.GetSysString(1295)); btnCancelOrFinish = env->addButton(irr::core::rect<s32>(205, 230, 295, 265), 0, BUTTON_CANCEL_OR_FINISH, dataManager.GetSysString(1295));
btnCancelOrFinish->setVisible(false); btnCancelOrFinish->setVisible(false);
//big picture //big picture
wBigCard = env->addWindow(rect<s32>(0, 0, 0, 0), false, L""); wBigCard = env->addWindow(irr::core::rect<s32>(0, 0, 0, 0), false, L"");
wBigCard->getCloseButton()->setVisible(false); wBigCard->getCloseButton()->setVisible(false);
wBigCard->setDrawTitlebar(false); wBigCard->setDrawTitlebar(false);
wBigCard->setDrawBackground(false); wBigCard->setDrawBackground(false);
wBigCard->setVisible(false); wBigCard->setVisible(false);
imgBigCard = env->addImage(rect<s32>(0, 0, 0, 0), wBigCard); imgBigCard = env->addImage(irr::core::rect<s32>(0, 0, 0, 0), wBigCard);
imgBigCard->setScaleImage(false); imgBigCard->setScaleImage(false);
imgBigCard->setUseAlphaChannel(true); imgBigCard->setUseAlphaChannel(true);
btnBigCardOriginalSize = env->addButton(rect<s32>(205, 100, 295, 135), 0, BUTTON_BIG_CARD_ORIG_SIZE, dataManager.GetSysString(1443)); btnBigCardOriginalSize = env->addButton(irr::core::rect<s32>(205, 100, 295, 135), 0, BUTTON_BIG_CARD_ORIG_SIZE, dataManager.GetSysString(1443));
btnBigCardZoomIn = env->addButton(rect<s32>(205, 140, 295, 175), 0, BUTTON_BIG_CARD_ZOOM_IN, dataManager.GetSysString(1441)); btnBigCardZoomIn = env->addButton(irr::core::rect<s32>(205, 140, 295, 175), 0, BUTTON_BIG_CARD_ZOOM_IN, dataManager.GetSysString(1441));
btnBigCardZoomOut = env->addButton(rect<s32>(205, 180, 295, 215), 0, BUTTON_BIG_CARD_ZOOM_OUT, dataManager.GetSysString(1442)); btnBigCardZoomOut = env->addButton(irr::core::rect<s32>(205, 180, 295, 215), 0, BUTTON_BIG_CARD_ZOOM_OUT, dataManager.GetSysString(1442));
btnBigCardClose = env->addButton(rect<s32>(205, 230, 295, 265), 0, BUTTON_BIG_CARD_CLOSE, dataManager.GetSysString(1440)); btnBigCardClose = env->addButton(irr::core::rect<s32>(205, 230, 295, 265), 0, BUTTON_BIG_CARD_CLOSE, dataManager.GetSysString(1440));
btnBigCardOriginalSize->setVisible(false); btnBigCardOriginalSize->setVisible(false);
btnBigCardZoomIn->setVisible(false); btnBigCardZoomIn->setVisible(false);
btnBigCardZoomOut->setVisible(false); btnBigCardZoomOut->setVisible(false);
btnBigCardClose->setVisible(false); btnBigCardClose->setVisible(false);
//leave/surrender/exit //leave/surrender/exit
btnLeaveGame = env->addButton(rect<s32>(205, 5, 295, 80), 0, BUTTON_LEAVE_GAME, L""); btnLeaveGame = env->addButton(irr::core::rect<s32>(205, 5, 295, 80), 0, BUTTON_LEAVE_GAME, L"");
btnLeaveGame->setVisible(false); btnLeaveGame->setVisible(false);
//tip //tip
stTip = env->addStaticText(L"", rect<s32>(0, 0, 150, 150), false, true, 0, -1, true); stTip = env->addStaticText(L"", irr::core::rect<s32>(0, 0, 150, 150), false, true, 0, -1, true);
stTip->setBackgroundColor(0xc0ffffff); stTip->setBackgroundColor(0xc0ffffff);
stTip->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); stTip->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
stTip->setVisible(false); stTip->setVisible(false);
//tip for cards in select / display list //tip for cards in select / display list
stCardListTip = env->addStaticText(L"", rect<s32>(0, 0, 150, 150), false, true, wCardSelect, TEXT_CARD_LIST_TIP, true); stCardListTip = env->addStaticText(L"", irr::core::rect<s32>(0, 0, 150, 150), false, true, wCardSelect, TEXT_CARD_LIST_TIP, true);
stCardListTip->setBackgroundColor(0xc0ffffff); stCardListTip->setBackgroundColor(0xc0ffffff);
stCardListTip->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER); stCardListTip->setTextAlignment(irr::gui::EGUIA_CENTER, irr::gui::EGUIA_CENTER);
stCardListTip->setVisible(false); stCardListTip->setVisible(false);
...@@ -1620,11 +1620,11 @@ void Game::ShowCardInfo(int code, bool resize) { ...@@ -1620,11 +1620,11 @@ void Game::ShowCardInfo(int code, bool resize) {
dtxt = guiFont->getDimension(formatBuffer); dtxt = guiFont->getDimension(formatBuffer);
if(dtxt.Width > (300 * xScale - 13) - 15) if(dtxt.Width > (300 * xScale - 13) - 15)
offset_arrows += 15; offset_arrows += 15;
stInfo->setRelativePosition(rect<s32>(15, 37, 300 * xScale - 13, (60 + offset_info))); stInfo->setRelativePosition(irr::core::rect<s32>(15, 37, 300 * xScale - 13, (60 + offset_info)));
stDataInfo->setRelativePosition(rect<s32>(15, (60 + offset_info), 300 * xScale - 13, (83 + offset_arrows))); stDataInfo->setRelativePosition(irr::core::rect<s32>(15, (60 + offset_info), 300 * xScale - 13, (83 + offset_arrows)));
stSetName->setRelativePosition(rect<s32>(15, (83 + offset_arrows), 296 * xScale, (83 + offset_arrows) + offset)); stSetName->setRelativePosition(irr::core::rect<s32>(15, (83 + offset_arrows), 296 * xScale, (83 + offset_arrows) + offset));
stText->setRelativePosition(rect<s32>(15, (83 + offset_arrows) + offset, 287 * xScale, 324 * yScale)); stText->setRelativePosition(irr::core::rect<s32>(15, (83 + offset_arrows) + offset, 287 * xScale, 324 * yScale));
scrCardText->setRelativePosition(rect<s32>(287 * xScale - 20, (83 + offset_arrows) + offset, 287 * xScale, 324 * yScale)); scrCardText->setRelativePosition(irr::core::rect<s32>(287 * xScale - 20, (83 + offset_arrows) + offset, 287 * xScale, 324 * yScale));
} }
else { else {
if (is_valid) if (is_valid)
...@@ -1633,9 +1633,9 @@ void Game::ShowCardInfo(int code, bool resize) { ...@@ -1633,9 +1633,9 @@ void Game::ShowCardInfo(int code, bool resize) {
myswprintf(formatBuffer, L"[%ls]", dataManager.unknown_string); myswprintf(formatBuffer, L"[%ls]", dataManager.unknown_string);
stInfo->setText(formatBuffer); stInfo->setText(formatBuffer);
stDataInfo->setText(L""); stDataInfo->setText(L"");
stSetName->setRelativePosition(rect<s32>(15, 60, 296 * xScale, 60 + offset)); stSetName->setRelativePosition(irr::core::rect<s32>(15, 60, 296 * xScale, 60 + offset));
stText->setRelativePosition(rect<s32>(15, 60 + offset, 287 * xScale, 324 * yScale)); stText->setRelativePosition(irr::core::rect<s32>(15, 60 + offset, 287 * xScale, 324 * yScale));
scrCardText->setRelativePosition(rect<s32>(287 * xScale - 20, 60 + offset, 287 * xScale, 324 * yScale)); scrCardText->setRelativePosition(irr::core::rect<s32>(287 * xScale - 20, 60 + offset, 287 * xScale, 324 * yScale));
} }
showingcode = code; showingcode = code;
showingtext = dataManager.GetText(code); showingtext = dataManager.GetText(code);
......
...@@ -222,8 +222,8 @@ public: ...@@ -222,8 +222,8 @@ public:
void FlashWindow(); void FlashWindow();
void SetCursor(irr::gui::ECURSOR_ICON icon); void SetCursor(irr::gui::ECURSOR_ICON icon);
template<typename T> template<typename T>
static void DrawShadowText(irr::gui::CGUITTFont* font, const T& text, const core::rect<s32>& position, const core::rect<s32>& padding, static void DrawShadowText(irr::gui::CGUITTFont* font, const T& text, const irr::core::rect<s32>& position, const irr::core::rect<s32>& padding,
video::SColor color = 0xffffffff, video::SColor shadowcolor = 0xff000000, bool hcenter = false, bool vcenter = false, const core::rect<s32>* clip = nullptr); video::SColor color = 0xffffffff, video::SColor shadowcolor = 0xff000000, bool hcenter = false, bool vcenter = false, const irr::core::rect<s32>* clip = nullptr);
std::mutex gMutex; std::mutex gMutex;
Signal frameSignal; Signal frameSignal;
......
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