Commit 1953b551 authored by fallenstardust's avatar fallenstardust

添加log按钮

更改贴图名称
增加按钮贴图
parent 6e578dad
...@@ -169,7 +169,7 @@ void DeckBuilder::Terminate() { ...@@ -169,7 +169,7 @@ void DeckBuilder::Terminate() {
mainGame->wCardImg->setVisible(false); mainGame->wCardImg->setVisible(false);
mainGame->wInfos->setVisible(false); mainGame->wInfos->setVisible(false);
mainGame->btnLeaveGame->setVisible(false); mainGame->btnLeaveGame->setVisible(false);
mainGame->wSettings->setVisible(false); mainGame->wPallet->setVisible(false);
mainGame->PopupElement(mainGame->wMainMenu); mainGame->PopupElement(mainGame->wMainMenu);
mainGame->device->setEventReceiver(&mainGame->menuHandler); mainGame->device->setEventReceiver(&mainGame->menuHandler);
mainGame->wACMessage->setVisible(false); mainGame->wACMessage->setVisible(false);
......
...@@ -388,14 +388,27 @@ bool Game::Initialize() { ...@@ -388,14 +388,27 @@ bool Game::Initialize() {
scrCardText->setLargeStep(1); scrCardText->setLargeStep(1);
scrCardText->setSmallStep(1); scrCardText->setSmallStep(1);
scrCardText->setVisible(false); scrCardText->setVisible(false);
//setting //imageButtons pallet
wPallet = env->addWindow(rect<s32>(265 * xScale, 275 * yScale, 305 * xScale, 635 * yScale), false, L""); wPallet = env->addWindow(rect<s32>(265 * xScale, 275 * yScale, 305 * xScale, 639 * yScale), false, L"");
wPallet->getCloseButton()->setVisible(false); wPallet->getCloseButton()->setVisible(false);
wPallet->setDraggable(false); wPallet->setDraggable(false);
wPallet->setDrawTitlebar(false); wPallet->setDrawTitlebar(false);
wPallet->setDrawBackground(false); wPallet->setDrawBackground(false);
wPallet->setVisible(false); wPallet->setVisible(false);
imgSettings = irr::gui::CGUIImageButton::addImageButton(env, rect<s32>(0 * yScale, 0 * yScale, 40 * yScale, 40 * yScale), wPallet, BUTTON_SETTINGS); //Logs
imgLog = irr::gui::CGUIImageButton::addImageButton(env, rect<s32>(0 * yScale, 65 * yScale, 45 * yScale, 110 * yScale), wPallet, BUTTON_SHOW_LOG);
imgLog->setImage(imageManager.tLogs);
imgLog->setImageSize(core::dimension2di(yScale, yScale));
//vol play/mute
imgVol = irr::gui::CGUIImageButton::addImageButton(env, rect<s32>(0 * yScale, 319 * yScale, 45 * yScale, 364 * yScale), wPallet, BUTTON_BGM);
if (gameConf.enable_music) {
imgVol->setImage(imageManager.tPlay);
} else {
imgVol->setImage(imageManager.tMute);
}
imgVol->setImageSize(core::dimension2di(yScale, yScale));
//Settings
imgSettings = irr::gui::CGUIImageButton::addImageButton(env, rect<s32>(0 * yScale, 0 * yScale, 45 * yScale, 45 * yScale), wPallet, BUTTON_SETTINGS);
imgSettings->setImage(imageManager.tSettings); imgSettings->setImage(imageManager.tSettings);
imgSettings->setImageSize(core::dimension2di(yScale, yScale)); imgSettings->setImageSize(core::dimension2di(yScale, yScale));
wSettings = env->addWindow(rect<s32>(220 * xScale, 100 * yScale, 800 * xScale, 520 * yScale), false, dataManager.GetSysString(1273)); wSettings = env->addWindow(rect<s32>(220 * xScale, 100 * yScale, 800 * xScale, 520 * yScale), false, dataManager.GetSysString(1273));
...@@ -403,8 +416,6 @@ bool Game::Initialize() { ...@@ -403,8 +416,6 @@ bool Game::Initialize() {
wSettings->setVisible(false); wSettings->setVisible(false);
irr::gui::IGUITabControl* tabSetting = env->addTabControl(rect<s32>(0 * xScale, 20 * yScale, 579 * xScale, 419 * yScale), wSettings, true); irr::gui::IGUITabControl* tabSetting = env->addTabControl(rect<s32>(0 * xScale, 20 * yScale, 579 * xScale, 419 * yScale), wSettings, true);
tabSetting->setTabHeight(40 * yScale); tabSetting->setTabHeight(40 * yScale);
//log
//imgLog = irr::gui::CGUIImageButton::addImageButton(env, rect<s32>(265 * yScale, 305 * yScale, 290 * yScale, 330 * yScale), 0, BUTTON_SHOW_LOG);
irr::gui::IGUITab* tabLog = tabSetting->addTab(dataManager.GetSysString(1271)); irr::gui::IGUITab* tabLog = tabSetting->addTab(dataManager.GetSysString(1271));
lstLog = env->addListBox(rect<s32>(10 * xScale, 10 * yScale, 790 * xScale, 510 * yScale), wSettings, LISTBOX_LOG, false); lstLog = env->addListBox(rect<s32>(10 * xScale, 10 * yScale, 790 * xScale, 510 * yScale), wSettings, LISTBOX_LOG, false);
lstLog->setItemHeight(25 * yScale); lstLog->setItemHeight(25 * yScale);
......
...@@ -34,7 +34,10 @@ bool ImageManager::Initial(const path dir) { ...@@ -34,7 +34,10 @@ bool ImageManager::Initial(const path dir) {
tAvatar[0] = driver->getTexture((dir + path("/textures/me.jpg")).c_str()); tAvatar[0] = driver->getTexture((dir + path("/textures/me.jpg")).c_str());
tAvatar[1] = driver->getTexture((dir + path("/textures/opponent.jpg")).c_str()); tAvatar[1] = driver->getTexture((dir + path("/textures/opponent.jpg")).c_str());
tLPBarFrame = driver->getTexture((dir + path("/textures/lpbarf.png")).c_str()); tLPBarFrame = driver->getTexture((dir + path("/textures/lpbarf.png")).c_str());
tSettings = driver->getTexture((dir + path("/textures/extra/settings.png")).c_str()); tSettings = driver->getTexture((dir + path("/textures/extra/tsettings.png")).c_str());
tLogs = driver->getTexture((dir + path("/textures/extra/tlogs.png")).c_str());
tMute = driver->getTexture((dir + path("/textures/extra/tmute.png")).c_str());
tPlay = driver->getTexture((dir + path("/textures/extra/tplay.png")).c_str());
if(!tBackGround_menu) if(!tBackGround_menu)
tBackGround_menu = tBackGround; tBackGround_menu = tBackGround;
tBackGround_deck = driver->getTexture((dir + path("/textures/bg_deck.jpg")).c_str()); tBackGround_deck = driver->getTexture((dir + path("/textures/bg_deck.jpg")).c_str());
......
...@@ -56,6 +56,9 @@ public: ...@@ -56,6 +56,9 @@ public:
irr::video::ITexture* tAvatar[2]; irr::video::ITexture* tAvatar[2];
irr::video::ITexture* tLPBarFrame; irr::video::ITexture* tLPBarFrame;
irr::video::ITexture* tSettings; irr::video::ITexture* tSettings;
irr::video::ITexture* tLogs;
irr::video::ITexture* tMute;
irr::video::ITexture* tPlay;
std::list<std::string> support_types; std::list<std::string> support_types;
}; };
......
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