Commit 95b32e4c authored by nanahira's avatar nanahira

Merge branch 'master' into another

parents c435cb0e 24f38e65
...@@ -633,14 +633,31 @@ bool Game::Initialize() { ...@@ -633,14 +633,31 @@ bool Game::Initialize() {
btnStartFilter->setRelativePosition(rect<s32>(260, 80 + 125 / 6, 390, 100 + 125 / 6)); btnStartFilter->setRelativePosition(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(rect<s32>(205, 80 + 125 / 6, 255, 100 + 125 / 6), wFilter, BUTTON_CLEAR_FILTER, dataManager.GetSysString(1304));
} }
wCategories = env->addWindow(rect<s32>(630, 60, 1000, 270), false, dataManager.strBuffer); wCategories = env->addWindow(rect<s32>(600, 60, 1000, 305), false, dataManager.strBuffer);
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>(135, 175, 235, 200), wCategories, BUTTON_CATEGORY_OK, dataManager.GetSysString(1211)); btnCategoryOK = env->addButton(rect<s32>(150, 210, 250, 235), wCategories, BUTTON_CATEGORY_OK, dataManager.GetSysString(1211));
for(int i = 0; i < 32; ++i) unsigned int catewidth[4];
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)); for(int i = 0; i < 3; ++i)
catewidth[i] = 0;
for(int i = 0; i < 32; ++i) {
unsigned char col = i % 4;
irr::core::dimension2d<unsigned int> dtxt = mainGame->guiFont->getDimension(dataManager.GetSysString(1100 + i));
if(dtxt.Width + 40 > catewidth[col])
catewidth[col] = dtxt.Width + 40;
}
for(int i = 0; i < 32; ++i) {
unsigned char col = i % 4;
unsigned int left_size = 0;
for (int j = 0; j < col; ++j)
left_size += catewidth[j];
chkCategory[i] = env->addCheckBox(false, recti(10 + left_size, 5 + (i / 4) * 25, 10 + left_size + catewidth[col], 5 + (i / 4 + 1) * 25), wCategories, -1, dataManager.GetSysString(1100 + i));
}
unsigned int wcatewidth = catewidth[0] + catewidth[1] + catewidth[2] + catewidth[3] + 16;
wCategories->setRelativePosition(rect<s32>(1000 - wcatewidth, 60, 1000, 305));
btnCategoryOK->setRelativePosition(recti(wcatewidth / 2 - 50, 210, wcatewidth / 2 + 50, 235));
btnMarksFilter = env->addButton(rect<s32>(60, 80 + 125 / 6, 190, 100 + 125 / 6), wFilter, BUTTON_MARKS_FILTER, dataManager.GetSysString(1374)); btnMarksFilter = env->addButton(rect<s32>(60, 80 + 125 / 6, 190, 100 + 125 / 6), wFilter, BUTTON_MARKS_FILTER, dataManager.GetSysString(1374));
wLinkMarks = env->addWindow(rect<s32>(700, 30, 820, 150), false, dataManager.strBuffer); wLinkMarks = env->addWindow(rect<s32>(700, 30, 820, 150), false, dataManager.strBuffer);
wLinkMarks->getCloseButton()->setVisible(false); wLinkMarks->getCloseButton()->setVisible(false);
...@@ -1861,7 +1878,13 @@ void Game::OnResize() { ...@@ -1861,7 +1878,13 @@ void Game::OnResize() {
btnClearFilter->setRelativePosition(Resize(205, 80 + 125 / 6, 255, 100 + 125 / 6)); btnClearFilter->setRelativePosition(Resize(205, 80 + 125 / 6, 255, 100 + 125 / 6));
btnMarksFilter->setRelativePosition(Resize(60, 80 + 125 / 6, 190, 100 + 125 / 6)); btnMarksFilter->setRelativePosition(Resize(60, 80 + 125 / 6, 190, 100 + 125 / 6));
wCategories->setRelativePosition(ResizeWin(450, 60, 1000, 270)); recti btncatepos = btnEffectFilter->getAbsolutePosition();
wCategories->setRelativePosition(recti(
btncatepos.LowerRightCorner.X - wCategories->getRelativePosition().getWidth(),
btncatepos.LowerRightCorner.Y - btncatepos.getHeight() / 2,
btncatepos.LowerRightCorner.X,
btncatepos.LowerRightCorner.Y - btncatepos.getHeight() / 2 + 245));
wLinkMarks->setRelativePosition(ResizeWin(700, 30, 820, 150)); wLinkMarks->setRelativePosition(ResizeWin(700, 30, 820, 150));
stBanlist->setRelativePosition(Resize(10, 9, 100, 29)); stBanlist->setRelativePosition(Resize(10, 9, 100, 29));
stDeck->setRelativePosition(Resize(10, 39, 100, 59)); stDeck->setRelativePosition(Resize(10, 39, 100, 59));
......
Subproject commit 42931d988b99711aa1ae0b86385789db4acd76c5 Subproject commit 5a6c0271cfa99dbb150a2c0afa09864a6d1ace2a
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