Commit 40935ebc authored by edo9300's avatar edo9300

Added anime filters + checkbox

parent f7441a0c
...@@ -186,18 +186,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -186,18 +186,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break; break;
} }
case BUTTON_START_FILTER: { case BUTTON_START_FILTER: {
filter_type = mainGame->cbCardType->getSelected(); StartFilter();
filter_type2 = mainGame->cbCardType2->getItemData(mainGame->cbCardType2->getSelected());
filter_lm = mainGame->cbLimit->getSelected();
if(filter_type == 1) {
filter_attrib = mainGame->cbAttribute->getItemData(mainGame->cbAttribute->getSelected());
filter_race = mainGame->cbRace->getItemData(mainGame->cbRace->getSelected());
filter_atk = parse_filter(mainGame->ebAttack->getText(), &filter_atktype);
filter_def = parse_filter(mainGame->ebDefense->getText(), &filter_deftype);
filter_lv = parse_filter(mainGame->ebStar->getText(), &filter_lvtype);
filter_scl = parse_filter(mainGame->ebScale->getText(), &filter_scltype);
}
FilterCards();
break; break;
} }
case BUTTON_CLEAR_FILTER: { case BUTTON_CLEAR_FILTER: {
...@@ -297,6 +286,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -297,6 +286,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
if (mainGame->btnMark[7]->isPressed()) if (mainGame->btnMark[7]->isPressed())
filter_marks |= 0004; filter_marks |= 0004;
mainGame->HideElement(mainGame->wLinkMarks); mainGame->HideElement(mainGame->wLinkMarks);
StartFilter();
break; break;
} }
} }
...@@ -321,18 +311,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -321,18 +311,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
case EDITBOX_KEYWORD: { case EDITBOX_KEYWORD: {
stringw filter = mainGame->ebCardName->getText(); stringw filter = mainGame->ebCardName->getText();
if (filter.size() > 2) { if (filter.size() > 2) {
filter_type = mainGame->cbCardType->getSelected(); StartFilter();
filter_type2 = mainGame->cbCardType2->getItemData(mainGame->cbCardType2->getSelected());
filter_lm = mainGame->cbLimit->getSelected();
if (filter_type == 1) {
filter_attrib = mainGame->cbAttribute->getItemData(mainGame->cbAttribute->getSelected());
filter_race = mainGame->cbRace->getItemData(mainGame->cbRace->getSelected());
filter_atk = parse_filter(mainGame->ebAttack->getText(), &filter_atktype);
filter_def = parse_filter(mainGame->ebDefense->getText(), &filter_deftype);
filter_lv = parse_filter(mainGame->ebStar->getText(), &filter_lvtype);
filter_scl = parse_filter(mainGame->ebScale->getText(), &filter_scltype);
}
FilterCards();
} }
break; break;
} }
...@@ -441,18 +420,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -441,18 +420,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break; break;
} }
} }
filter_type = mainGame->cbCardType->getSelected(); StartFilter();
filter_type2 = mainGame->cbCardType2->getItemData(mainGame->cbCardType2->getSelected());
filter_lm = mainGame->cbLimit->getSelected();
if (filter_type == 1) {
filter_attrib = mainGame->cbAttribute->getItemData(mainGame->cbAttribute->getSelected());
filter_race = mainGame->cbRace->getItemData(mainGame->cbRace->getSelected());
filter_atk = parse_filter(mainGame->ebAttack->getText(), &filter_atktype);
filter_def = parse_filter(mainGame->ebDefense->getText(), &filter_deftype);
filter_lv = parse_filter(mainGame->ebStar->getText(), &filter_lvtype);
filter_scl = parse_filter(mainGame->ebScale->getText(), &filter_scltype);
}
FilterCards();
break; break;
} }
case COMBOBOX_SECONDTYPE: case COMBOBOX_SECONDTYPE:
...@@ -465,18 +433,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -465,18 +433,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame->ebDefense->setEnabled(true); mainGame->ebDefense->setEnabled(true);
} }
} }
filter_type = mainGame->cbCardType->getSelected(); StartFilter();
filter_type2 = mainGame->cbCardType2->getItemData(mainGame->cbCardType2->getSelected());
filter_lm = mainGame->cbLimit->getSelected();
if(filter_type == 1) {
filter_attrib = mainGame->cbAttribute->getItemData(mainGame->cbAttribute->getSelected());
filter_race = mainGame->cbRace->getItemData(mainGame->cbRace->getSelected());
filter_atk = parse_filter(mainGame->ebAttack->getText(), &filter_atktype);
filter_def = parse_filter(mainGame->ebDefense->getText(), &filter_deftype);
filter_lv = parse_filter(mainGame->ebStar->getText(), &filter_lvtype);
filter_scl = parse_filter(mainGame->ebScale->getText(), &filter_scltype);
}
FilterCards();
break; break;
} }
case COMBOBOX_SORTTYPE: { case COMBOBOX_SORTTYPE: {
...@@ -485,13 +442,33 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -485,13 +442,33 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break; break;
} }
} }
break;
} }
case irr::gui::EGET_CHECKBOX_CHANGED: { case irr::gui::EGET_CHECKBOX_CHANGED: {
case CHECKBOX_ENABLE_MUSIC: { switch (id) {
if (!mainGame->chkEnableMusic->isChecked()) case CHECKBOX_SHOW_ANIME: {
mainGame->engineMusic->stopAllSounds(); int prevLimit = mainGame->cbLimit->getSelected();
break; mainGame->cbLimit->clear();
mainGame->cbLimit->addItem(dataManager.GetSysString(1310));
mainGame->cbLimit->addItem(dataManager.GetSysString(1316));
mainGame->cbLimit->addItem(dataManager.GetSysString(1317));
mainGame->cbLimit->addItem(dataManager.GetSysString(1318));
mainGame->cbLimit->addItem(dataManager.GetSysString(1240));
mainGame->cbLimit->addItem(dataManager.GetSysString(1241));
mainGame->cbLimit->addItem(dataManager.GetSysString(1242));
if(mainGame->chkAnime->isChecked()) {
mainGame->cbLimit->addItem(dataManager.GetSysString(1243));
mainGame->cbLimit->addItem(L"Illegal");
mainGame->cbLimit->addItem(L"VG");
mainGame->cbLimit->addItem(L"Custom");
}
if (prevLimit < 8)
mainGame->cbLimit->setSelected(prevLimit);
StartFilter();
break;
}
} }
break;
} }
default: break; default: break;
} }
...@@ -748,6 +725,20 @@ void DeckBuilder::GetHoveredCard() { ...@@ -748,6 +725,20 @@ void DeckBuilder::GetHoveredCard() {
imageManager.RemoveTexture(pre_code); imageManager.RemoveTexture(pre_code);
} }
} }
void DeckBuilder::StartFilter() {
filter_type = mainGame->cbCardType->getSelected();
filter_type2 = mainGame->cbCardType2->getItemData(mainGame->cbCardType2->getSelected());
filter_lm = mainGame->cbLimit->getSelected();
if(filter_type == 1) {
filter_attrib = mainGame->cbAttribute->getItemData(mainGame->cbAttribute->getSelected());
filter_race = mainGame->cbRace->getItemData(mainGame->cbRace->getSelected());
filter_atk = parse_filter(mainGame->ebAttack->getText(), &filter_atktype);
filter_def = parse_filter(mainGame->ebDefense->getText(), &filter_deftype);
filter_lv = parse_filter(mainGame->ebStar->getText(), &filter_lvtype);
filter_scl = parse_filter(mainGame->ebScale->getText(), &filter_scltype);
}
FilterCards();
}
void DeckBuilder::FilterCards() { void DeckBuilder::FilterCards() {
results.clear(); results.clear();
const wchar_t* pstr = mainGame->ebCardName->getText(); const wchar_t* pstr = mainGame->ebCardName->getText();
...@@ -767,7 +758,7 @@ void DeckBuilder::FilterCards() { ...@@ -767,7 +758,7 @@ void DeckBuilder::FilterCards() {
for(code_pointer ptr = dataManager._datas.begin(); ptr != dataManager._datas.end(); ++ptr, ++strpointer) { for(code_pointer ptr = dataManager._datas.begin(); ptr != dataManager._datas.end(); ++ptr, ++strpointer) {
const CardDataC& data = ptr->second; const CardDataC& data = ptr->second;
const CardString& text = strpointer->second; const CardString& text = strpointer->second;
if(data.type & TYPE_TOKEN) if(data.type & TYPE_TOKEN || (data.ot > 3 && !mainGame->chkAnime->isChecked()))
continue; continue;
switch(filter_type) { switch(filter_type) {
case 1: { case 1: {
...@@ -800,7 +791,7 @@ void DeckBuilder::FilterCards() { ...@@ -800,7 +791,7 @@ void DeckBuilder::FilterCards() {
if((filter_scltype == 1 && data.lscale != filter_scl) || (filter_scltype == 2 && data.lscale < filter_scl) if((filter_scltype == 1 && data.lscale != filter_scl) || (filter_scltype == 2 && data.lscale < filter_scl)
|| (filter_scltype == 3 && data.lscale <= filter_scl) || (filter_scltype == 4 && (data.lscale > filter_scl || data.lscale == 0)) || (filter_scltype == 3 && data.lscale <= filter_scl) || (filter_scltype == 4 && (data.lscale > filter_scl || data.lscale == 0))
|| (filter_scltype == 5 && (data.lscale >= filter_scl || data.lscale == 0)) || filter_scltype == 6 || (filter_scltype == 5 && (data.lscale >= filter_scl || data.lscale == 0)) || filter_scltype == 6
|| !(data.type & TYPE_PENDULUM)) || !(data.type & TYPE_PENDULUM))
continue; continue;
} }
break; break;
...@@ -835,6 +826,12 @@ void DeckBuilder::FilterCards() { ...@@ -835,6 +826,12 @@ void DeckBuilder::FilterCards() {
continue; continue;
if(filter_lm == 7 && data.ot != 4) if(filter_lm == 7 && data.ot != 4)
continue; continue;
if(filter_lm == 8 && data.ot != 8)
continue;
if(filter_lm == 9 && data.ot != 16)
continue;
if(filter_lm == 10 && data.ot != 32)
continue;
} }
if(pstr) { if(pstr) {
if(!(CardNameCompare(text.name, pstr)) && !(CardNameCompare(text.text, pstr))) { if(!(CardNameCompare(text.name, pstr)) && !(CardNameCompare(text.text, pstr))) {
......
...@@ -15,6 +15,7 @@ public: ...@@ -15,6 +15,7 @@ public:
void Terminate(); void Terminate();
void GetHoveredCard(); void GetHoveredCard();
void FilterCards(); void FilterCards();
void StartFilter();
void ClearFilter(); void ClearFilter();
void ClearSearch(); void ClearSearch();
void SortList(); void SortList();
......
...@@ -931,11 +931,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -931,11 +931,6 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
} }
break; break;
} }
case CHECKBOX_ENABLE_MUSIC: {
if(!mainGame->chkEnableMusic->isChecked())
mainGame->engineMusic->stopAllSounds();
break;
}
} }
break; break;
} }
...@@ -2085,6 +2080,16 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) { ...@@ -2085,6 +2080,16 @@ bool ClientField::OnCommonEvent(const irr::SEvent& event) {
} }
break; break;
} }
case irr::gui::EGET_CHECKBOX_CHANGED: {
switch (id) {
case CHECKBOX_ENABLE_MUSIC: {
if (!mainGame->chkEnableMusic->isChecked())
mainGame->engineMusic->stopAllSounds();
break;
}
}
break;
}
default: break; default: break;
} }
break; break;
......
...@@ -482,17 +482,19 @@ bool Game::Initialize() { ...@@ -482,17 +482,19 @@ bool Game::Initialize() {
//filters //filters
wFilter = env->addStaticText(L"", rect<s32>(610, 5, 1020, 130), true, false, 0, -1, true); wFilter = env->addStaticText(L"", 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, 25 / 6 + 2, 70, 22 + 25 / 6), false, false, wFilter); stCategory = env->addStaticText(dataManager.GetSysString(1311), rect<s32>(10, 5, 70, 25), false, false, wFilter);
cbCardType = env->addComboBox(rect<s32>(60, 25 / 6, 120, 20 + 25 / 6), wFilter, COMBOBOX_MAINTYPE); cbCardType = env->addComboBox(rect<s32>(60, 3, 120, 23), 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, 200, 20 + 25 / 6), wFilter, COMBOBOX_SECONDTYPE); cbCardType2 = env->addComboBox(rect<s32>(130, 3, 190, 23), wFilter, COMBOBOX_SECONDTYPE);
cbCardType2->setMaxSelectionRows(10); cbCardType2->setMaxSelectionRows(20);
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); chkAnime = env->addCheckBox(false, recti(10, 96, 150, 118), wFilter, CHECKBOX_SHOW_ANIME, dataManager.GetSysString(1999));
cbLimit = env->addComboBox(rect<s32>(260, 25 / 6, 390, 20 + 25 / 6), wFilter, COMBOBOX_OTHER_FILT); chkAnime->setChecked(gameConf.chkAnime != 0);
stLimit = env->addStaticText(dataManager.GetSysString(1315), rect<s32>(205, 5, 280, 25), false, false, wFilter);
cbLimit = env->addComboBox(rect<s32>(260, 3, 390, 23), wFilter, COMBOBOX_OTHER_FILT);
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));
...@@ -501,37 +503,42 @@ bool Game::Initialize() { ...@@ -501,37 +503,42 @@ bool Game::Initialize() {
cbLimit->addItem(dataManager.GetSysString(1240)); cbLimit->addItem(dataManager.GetSysString(1240));
cbLimit->addItem(dataManager.GetSysString(1241)); cbLimit->addItem(dataManager.GetSysString(1241));
cbLimit->addItem(dataManager.GetSysString(1242)); cbLimit->addItem(dataManager.GetSysString(1242));
cbLimit->addItem(dataManager.GetSysString(1243)); if(chkAnime->isChecked()) {
stAttribute = env->addStaticText(dataManager.GetSysString(1319), rect<s32>(10, 22 + 50 / 6, 70, 42 + 50 / 6), false, false, wFilter); cbLimit->addItem(dataManager.GetSysString(1243));
cbAttribute = env->addComboBox(rect<s32>(60, 20 + 50 / 6, 190, 40 + 50 / 6), wFilter, COMBOBOX_OTHER_FILT); cbLimit->addItem(L"Illegal");
cbLimit->addItem(L"VG");
cbLimit->addItem(L"Custom");
}
stAttribute = env->addStaticText(dataManager.GetSysString(1319), rect<s32>(10, 28, 70, 48), false, false, wFilter);
cbAttribute = env->addComboBox(rect<s32>(60, 26, 190, 46), wFilter, COMBOBOX_OTHER_FILT);
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), filter); cbAttribute->addItem(dataManager.FormatAttribute(filter), 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), rect<s32>(10, 51, 70, 71), false, false, wFilter);
cbRace = env->addComboBox(rect<s32>(60, 40 + 75 / 6, 190, 60 + 75 / 6), wFilter, COMBOBOX_OTHER_FILT); cbRace = env->addComboBox(rect<s32>(60, 49, 190, 69), wFilter, COMBOBOX_OTHER_FILT);
cbRace->setMaxSelectionRows(10); cbRace->setMaxSelectionRows(10);
cbRace->addItem(dataManager.GetSysString(1310), 0); cbRace->addItem(dataManager.GetSysString(1310), 0);
for(int filter = 0x1; filter != 0x2000000; filter <<= 1) for(int filter = 0x1; filter != 0x2000000; filter <<= 1)
cbRace->addItem(dataManager.FormatRace(filter), filter); cbRace->addItem(dataManager.FormatRace(filter), 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), rect<s32>(205, 28, 280, 48), false, false, wFilter);
ebAttack = env->addEditBox(L"", rect<s32>(260, 20 + 50 / 6, 340, 40 + 50 / 6), true, wFilter); ebAttack = env->addEditBox(L"", rect<s32>(260, 26, 340, 46), true, wFilter);
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), rect<s32>(205, 51, 280, 71), false, false, wFilter);
ebDefense = env->addEditBox(L"", rect<s32>(260, 40 + 75 / 6, 340, 60 + 75 / 6), true, wFilter); ebDefense = env->addEditBox(L"", rect<s32>(260, 49, 340, 69), true, wFilter);
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), rect<s32>(10, 74, 80, 94), false, false, wFilter);
ebStar = env->addEditBox(L"", rect<s32>(60, 60 + 100 / 6, 100, 80 + 100 / 6), true, wFilter); ebStar = env->addEditBox(L"", rect<s32>(60, 72, 100, 92), true, wFilter);
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), rect<s32>(110, 74, 150, 94), false, false, wFilter);
ebScale = env->addEditBox(L"", rect<s32>(150, 60 + 100 / 6, 190, 80 + 100 / 6), true, wFilter); ebScale = env->addEditBox(L"", rect<s32>(150, 72, 190, 92), true, wFilter);
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), rect<s32>(205, 74, 280, 94), 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"", rect<s32>(260, 72, 390, 92), 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(rect<s32>(345, 28, 390, 69), wFilter, BUTTON_EFFECT_FILTER, dataManager.GetSysString(1326));
btnStartFilter = env->addButton(rect<s32>(260, 80 + 125 / 6, 390, 100 + 125 / 6), wFilter, BUTTON_START_FILTER, dataManager.GetSysString(1327)); btnStartFilter = env->addButton(rect<s32>(260, 96, 390, 118), wFilter, BUTTON_START_FILTER, dataManager.GetSysString(1327));
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, 96, 255, 118), wFilter, BUTTON_CLEAR_FILTER, dataManager.GetSysString(1304));
wCategories = env->addWindow(rect<s32>(450, 60, 1000, 270), false, dataManager.strBuffer); wCategories = env->addWindow(rect<s32>(450, 60, 1000, 270), false, dataManager.strBuffer);
wCategories->getCloseButton()->setVisible(false); wCategories->getCloseButton()->setVisible(false);
wCategories->setDrawTitlebar(false); wCategories->setDrawTitlebar(false);
...@@ -540,7 +547,7 @@ bool Game::Initialize() { ...@@ -540,7 +547,7 @@ bool Game::Initialize() {
btnCategoryOK = env->addButton(rect<s32>(200, 175, 300, 200), wCategories, BUTTON_CATEGORY_OK, dataManager.GetSysString(1211)); btnCategoryOK = env->addButton(rect<s32>(200, 175, 300, 200), wCategories, BUTTON_CATEGORY_OK, dataManager.GetSysString(1211));
for(int i = 0; i < 32; ++i) for(int i = 0; i < 32; ++i)
chkCategory[i] = env->addCheckBox(false, recti(10 + (i % 4) * 130, 10 + (i / 4) * 20, 140 + (i % 4) * 130, 30 + (i / 4) * 20), wCategories, -1, dataManager.GetSysString(1100 + i)); chkCategory[i] = env->addCheckBox(false, recti(10 + (i % 4) * 130, 10 + (i / 4) * 20, 140 + (i % 4) * 130, 30 + (i / 4) * 20), wCategories, -1, dataManager.GetSysString(1100 + i));
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>(155, 96, 240, 118), 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);
wLinkMarks->setDrawTitlebar(false); wLinkMarks->setDrawTitlebar(false);
...@@ -1017,6 +1024,7 @@ void Game::LoadConfig() { ...@@ -1017,6 +1024,7 @@ void Game::LoadConfig() {
gameConf.volume = 1.0; gameConf.volume = 1.0;
gameConf.enablemusic = true; gameConf.enablemusic = true;
gameConf.draw_field_spell = 1; gameConf.draw_field_spell = 1;
gameConf.chkAnime = 0;
while(fgets(linebuf, 256, fp)) { while(fgets(linebuf, 256, fp)) {
sscanf(linebuf, "%s = %s", strbuf, valbuf); sscanf(linebuf, "%s = %s", strbuf, valbuf);
if(!strcmp(strbuf, "antialias")) { if(!strcmp(strbuf, "antialias")) {
...@@ -1065,6 +1073,8 @@ void Game::LoadConfig() { ...@@ -1065,6 +1073,8 @@ void Game::LoadConfig() {
gameConf.chkHideHintButton = atoi(valbuf); gameConf.chkHideHintButton = atoi(valbuf);
} else if(!strcmp(strbuf, "draw_field_spell")) { } else if(!strcmp(strbuf, "draw_field_spell")) {
gameConf.draw_field_spell = atoi(valbuf); gameConf.draw_field_spell = atoi(valbuf);
} else if(!strcmp(strbuf, "show_anime")) {
gameConf.chkAnime = atoi(valbuf);
} else if(!strcmp(strbuf, "enable_sound")) { } else if(!strcmp(strbuf, "enable_sound")) {
gameConf.enablesound = atoi(valbuf) > 0; gameConf.enablesound = atoi(valbuf) > 0;
} else if (!strcmp(strbuf, "skin_index")) { } else if (!strcmp(strbuf, "skin_index")) {
...@@ -1124,6 +1134,7 @@ void Game::SaveConfig() { ...@@ -1124,6 +1134,7 @@ void Game::SaveConfig() {
fprintf(fp, "hide_setname = %d\n", ((gameConf.chkHideSetname) ? 1 : 0)); fprintf(fp, "hide_setname = %d\n", ((gameConf.chkHideSetname) ? 1 : 0));
fprintf(fp, "hide_hint_button = %d\n", ((chkHideHintButton->isChecked()) ? 1 : 0)); fprintf(fp, "hide_hint_button = %d\n", ((chkHideHintButton->isChecked()) ? 1 : 0));
fprintf(fp, "draw_field_spell = %d\n", gameConf.draw_field_spell); fprintf(fp, "draw_field_spell = %d\n", gameConf.draw_field_spell);
fprintf(fp, "show_anime = %d\n", ((chkAnime->isChecked()) ? 1 : 0));
fprintf(fp, "skin_index = %d\n", gameConf.skin_index); fprintf(fp, "skin_index = %d\n", gameConf.skin_index);
fprintf(fp, "enable_sound = %d\n", ((chkEnableSound->isChecked()) ? 1 : 0)); fprintf(fp, "enable_sound = %d\n", ((chkEnableSound->isChecked()) ? 1 : 0));
fprintf(fp, "enable_music = %d\n", ((chkEnableMusic->isChecked()) ? 1 : 0)); fprintf(fp, "enable_music = %d\n", ((chkEnableMusic->isChecked()) ? 1 : 0));
...@@ -1390,15 +1401,16 @@ void Game::OnResize() ...@@ -1390,15 +1401,16 @@ void Game::OnResize()
cbRace->setRelativePosition(Resize(60, 49, 190, 69)); cbRace->setRelativePosition(Resize(60, 49, 190, 69));
cbAttribute->setRelativePosition(Resize(60, 26, 190, 46)); cbAttribute->setRelativePosition(Resize(60, 26, 190, 46));
cbLimit->setRelativePosition(Resize(260, 3, 390, 23)); cbLimit->setRelativePosition(Resize(260, 3, 390, 23));
ebStar->setRelativePosition(Resize(60, 60 + 100 / 6, 100, 80 + 100 / 6)); ebStar->setRelativePosition(Resize(60, 72, 100, 92));
ebScale->setRelativePosition(Resize(150, 60 + 100 / 6, 190, 80 + 100 / 6)); ebScale->setRelativePosition(Resize(150, 72, 190, 92));
ebAttack->setRelativePosition(Resize(260, 26, 340, 46)); ebAttack->setRelativePosition(Resize(260, 26, 340, 46));
ebDefense->setRelativePosition(Resize(260, 49, 340, 69)); ebDefense->setRelativePosition(Resize(260, 49, 340, 69));
ebCardName->setRelativePosition(Resize(260, 72, 390, 92)); ebCardName->setRelativePosition(Resize(260, 72, 390, 92));
btnEffectFilter->setRelativePosition(Resize(345, 28, 390, 69)); btnEffectFilter->setRelativePosition(Resize(345, 28, 390, 69));
btnStartFilter->setRelativePosition(Resize(260, 96, 390, 118)); btnStartFilter->setRelativePosition(Resize(327, 96, 390, 118));
btnClearFilter->setRelativePosition(Resize(205, 96, 255, 118)); btnClearFilter->setRelativePosition(Resize(260, 96, 322, 118));
btnMarksFilter->setRelativePosition(Resize(60, 80 + 125 / 6, 190, 100 + 125 / 6)); btnMarksFilter->setRelativePosition(Resize(155, 96, 240, 118));
chkAnime->setRelativePosition(Resize(10, 96, 150, 118));
wCategories->setRelativePosition(ResizeWin(450, 60, 1000, 270)); wCategories->setRelativePosition(ResizeWin(450, 60, 1000, 270));
wLinkMarks->setRelativePosition(ResizeWin(700, 30, 820, 150)); wLinkMarks->setRelativePosition(ResizeWin(700, 30, 820, 150));
...@@ -1410,9 +1422,9 @@ void Game::OnResize() ...@@ -1410,9 +1422,9 @@ void Game::OnResize()
stRace->setRelativePosition(ResizeWin(10, 51, 70, 71)); stRace->setRelativePosition(ResizeWin(10, 51, 70, 71));
stAttack->setRelativePosition(ResizeWin(205, 28, 280, 48)); stAttack->setRelativePosition(ResizeWin(205, 28, 280, 48));
stDefense->setRelativePosition(ResizeWin(205, 51, 280, 71)); stDefense->setRelativePosition(ResizeWin(205, 51, 280, 71));
stStar->setRelativePosition(ResizeWin(10, 62 + 100 / 6, 80, 82 + 100 / 6)); stStar->setRelativePosition(ResizeWin(10, 74, 80, 94));
stSearch->setRelativePosition(ResizeWin(205, 74, 280, 94)); stSearch->setRelativePosition(ResizeWin(205, 74, 280, 94));
stScale->setRelativePosition(ResizeWin(101, 62 + 100 / 6, 150, 82 + 100 / 6)); stScale->setRelativePosition(ResizeWin(110, 74, 150, 94));
btnSideOK->setRelativePosition(Resize(510, 40, 820, 80)); btnSideOK->setRelativePosition(Resize(510, 40, 820, 80));
btnDeleteDeck->setRelativePosition(Resize(225, 95, 290, 120)); btnDeleteDeck->setRelativePosition(Resize(225, 95, 290, 120));
......
...@@ -344,7 +344,7 @@ ...@@ -344,7 +344,7 @@
!system 1324 Lv/Rank: !system 1324 Lv/Rank:
!system 1325 Search: !system 1325 Search:
!system 1326 Effect !system 1326 Effect
!system 1327 Full search !system 1327 Search
!system 1329 Archetype: !system 1329 Archetype:
!system 1330 Deck: !system 1330 Deck:
!system 1331 Extra: !system 1331 Extra:
...@@ -426,6 +426,7 @@ ...@@ -426,6 +426,7 @@
!system 1624 Die landed on: !system 1624 Die landed on:
!system 1625 Event Modes !system 1625 Event Modes
!system 1626 Destiny Draw !system 1626 Destiny Draw
!system 1999 Show anime cards
!system 2046 Enable sound effects !system 2046 Enable sound effects
!system 2047 Enable music !system 2047 Enable music
#victory reason #victory reason
......
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