Commit de2e840a authored by DailyShana's avatar DailyShana

layer

parent 72451201
......@@ -633,6 +633,10 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
case irr::EMIE_MOUSE_MOVED: {
int x = event.MouseInput.X;
int y = event.MouseInput.Y;
position2d<s32> mouse_pos = position2d<s32>(x, y);
irr::gui::IGUIElement* root = mainGame->env->getRootGUIElement();
if(root->getElementFromPoint(mouse_pos) != root)
break;
int pre_code = hovered_code;
if(x >= 314 && x <= 794 && y >= 164 && y <= 435) {
int lx = 10, px, py = (y - 164) / 68;
......
......@@ -403,6 +403,18 @@ bool Game::Initialize() {
btnClearDeck = env->addButton(rect<s32>(115, 99, 165, 120), wDeckEdit, BUTTON_CLEAR_DECK, dataManager.GetSysString(1304));
btnSideOK = env->addButton(rect<s32>(510, 40, 820, 80), 0, BUTTON_SIDE_OK, dataManager.GetSysString(1334));
btnSideOK->setVisible(false);
//
scrFilter = env->addScrollBar(false, recti(999, 161, 1019, 629), 0, SCROLL_FILTER);
scrFilter->setLargeStep(10);
scrFilter->setSmallStep(1);
scrFilter->setVisible(false);
//sort type
wSort = env->addStaticText(L"", rect<s32>(930, 132, 1020, 156), true, false, 0, -1, true);
cbSortType = env->addComboBox(rect<s32>(10, 2, 85, 22), wSort, COMBOBOX_SORTTYPE);
cbSortType->setMaxSelectionRows(10);
for(int i = 1370; i <= 1373; i++)
cbSortType->addItem(dataManager.GetSysString(i));
wSort->setVisible(false);
//filters
wFilter = env->addStaticText(L"", rect<s32>(610, 5, 1020, 130), true, false, 0, -1, true);
wFilter->setVisible(false);
......@@ -465,17 +477,6 @@ bool Game::Initialize() {
btnCategoryOK = env->addButton(rect<s32>(135, 175, 235, 200), wCategories, BUTTON_CATEGORY_OK, dataManager.GetSysString(1211));
for(int i = 0; i < 32; ++i)
chkCategory[i] = env->addCheckBox(false, recti(10 + (i % 4) * 90, 10 + (i / 4) * 20, 100 + (i % 4) * 90, 30 + (i / 4) * 20), wCategories, -1, dataManager.GetSysString(1100 + i));
scrFilter = env->addScrollBar(false, recti(999, 161, 1019, 629), 0, SCROLL_FILTER);
scrFilter->setLargeStep(10);
scrFilter->setSmallStep(1);
scrFilter->setVisible(false);
//sort type
wSort = env->addStaticText(L"", rect<s32>(930, 132, 1020, 156), true, false, 0, -1, true);
cbSortType = env->addComboBox(rect<s32>(10, 2, 85, 22), wSort, COMBOBOX_SORTTYPE);
cbSortType->setMaxSelectionRows(10);
for(int i = 1370; i <= 1373; i++)
cbSortType->addItem(dataManager.GetSysString(i));
wSort->setVisible(false);
//replay window
wReplay = env->addWindow(rect<s32>(220, 100, 800, 520), false, dataManager.GetSysString(1202));
wReplay->getCloseButton()->setVisible(false);
......
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