Commit a9c706be authored by wind2009's avatar wind2009

Merge remote-tracking branch '233/patch-side-chat' into develop

parents fe5ab42e 8bf11d3a
Pipeline #26965 passed with stages
in 4 minutes and 24 seconds
......@@ -1249,7 +1249,8 @@ void Game::DrawDeckBd() {
driver->draw2DRectangleOutline(Resize(313 + i * dx, 563, 359 + i * dx, 629));
}
}
if (is_siding) {
if(is_siding) {
// side chat background
driver->draw2DRectangle(Resize(805, 10, 1020, 630), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000);
driver->draw2DRectangleOutline(Resize(804, 9, 1020, 630));
} else {
......@@ -1260,64 +1261,64 @@ void Game::DrawDeckBd() {
DrawShadowText(numFont, deckBuilder.result_string, Resize(875, 137, 935, 157), Resize(1, 1, 1, 1), 0xffffffff, 0xff000000, false, true);
driver->draw2DRectangle(Resize(805, 160, 1020, 630), 0x400000ff, 0x400000ff, 0x40000000, 0x40000000);
driver->draw2DRectangleOutline(Resize(804, 159, 1020, 630));
for(size_t i = 0; i < 9 && i + scrFilter->getPos() < deckBuilder.results.size(); ++i) {
code_pointer ptr = deckBuilder.results[i + scrFilter->getPos()];
if(i >= 7)
{
imageManager.GetTextureThumb(ptr->second.code);
break;
}
if(deckBuilder.hovered_pos == 4 && deckBuilder.hovered_seq == (int)i)
driver->draw2DRectangle(0x80000000, Resize(806, 164 + i * 66, 1019, 230 + i * 66));
DrawThumb(ptr, position2di(810, 165 + i * 66), deckBuilder.filterList);
if(ptr->second.type & TYPE_MONSTER) {
myswprintf(textBuffer, L"%ls", dataManager.GetName(ptr->first));
DrawShadowText(textFont, textBuffer, Resize(860, 165 + i * 66, 955, 185 + i * 66), Resize(1, 1, 0, 0));
if(!(ptr->second.type & TYPE_LINK)) {
const wchar_t* form = L"\u2605";
if(ptr->second.type & TYPE_XYZ) form = L"\u2606";
myswprintf(textBuffer, L"%ls/%ls %ls%d", dataManager.FormatAttribute(ptr->second.attribute), dataManager.FormatRace(ptr->second.race), form, ptr->second.level);
DrawShadowText(textFont, textBuffer, Resize(860, 187 + i * 66, 955, 207 + i * 66), Resize(1, 1, 0, 0));
if(ptr->second.attack < 0 && ptr->second.defense < 0)
myswprintf(textBuffer, L"?/?");
else if(ptr->second.attack < 0)
myswprintf(textBuffer, L"?/%d", ptr->second.defense);
else if(ptr->second.defense < 0)
myswprintf(textBuffer, L"%d/?", ptr->second.attack);
else myswprintf(textBuffer, L"%d/%d", ptr->second.attack, ptr->second.defense);
} else {
myswprintf(textBuffer, L"%ls/%ls LINK-%d", dataManager.FormatAttribute(ptr->second.attribute), dataManager.FormatRace(ptr->second.race), ptr->second.level);
DrawShadowText(textFont, textBuffer, Resize(860, 187 + i * 66, 955, 207 + i * 66), Resize(1, 1, 0, 0));
if(ptr->second.attack < 0)
myswprintf(textBuffer, L"?/-");
else myswprintf(textBuffer, L"%d/-", ptr->second.attack);
}
if(ptr->second.type & TYPE_PENDULUM) {
wchar_t scaleBuffer[16];
myswprintf(scaleBuffer, L" %d/%d", ptr->second.lscale, ptr->second.rscale);
wcscat(textBuffer, scaleBuffer);
}
if((ptr->second.ot & AVAIL_OCGTCG) == AVAIL_OCG)
wcscat(textBuffer, L" [OCG]");
else if((ptr->second.ot & AVAIL_OCGTCG) == AVAIL_TCG)
wcscat(textBuffer, L" [TCG]");
else if((ptr->second.ot & AVAIL_CUSTOM) == AVAIL_CUSTOM)
wcscat(textBuffer, L" [Custom]");
DrawShadowText(textFont, textBuffer, Resize(860, 209 + i * 66, 955, 229 + i * 66), Resize(1, 1, 0, 0));
}
for(size_t i = 0; i < 9 && i + scrFilter->getPos() < deckBuilder.results.size(); ++i) {
code_pointer ptr = deckBuilder.results[i + scrFilter->getPos()];
if(i >= 7)
{
imageManager.GetTextureThumb(ptr->second.code);
break;
}
if(deckBuilder.hovered_pos == 4 && deckBuilder.hovered_seq == (int)i)
driver->draw2DRectangle(0x80000000, Resize(806, 164 + i * 66, 1019, 230 + i * 66));
DrawThumb(ptr, position2di(810, 165 + i * 66), deckBuilder.filterList);
if(ptr->second.type & TYPE_MONSTER) {
myswprintf(textBuffer, L"%ls", dataManager.GetName(ptr->first));
DrawShadowText(textFont, textBuffer, Resize(860, 165 + i * 66, 955, 185 + i * 66), Resize(1, 1, 0, 0));
if(!(ptr->second.type & TYPE_LINK)) {
const wchar_t* form = L"\u2605";
if(ptr->second.type & TYPE_XYZ) form = L"\u2606";
myswprintf(textBuffer, L"%ls/%ls %ls%d", dataManager.FormatAttribute(ptr->second.attribute), dataManager.FormatRace(ptr->second.race), form, ptr->second.level);
DrawShadowText(textFont, textBuffer, Resize(860, 187 + i * 66, 955, 207 + i * 66), Resize(1, 1, 0, 0));
if(ptr->second.attack < 0 && ptr->second.defense < 0)
myswprintf(textBuffer, L"?/?");
else if(ptr->second.attack < 0)
myswprintf(textBuffer, L"?/%d", ptr->second.defense);
else if(ptr->second.defense < 0)
myswprintf(textBuffer, L"%d/?", ptr->second.attack);
else myswprintf(textBuffer, L"%d/%d", ptr->second.attack, ptr->second.defense);
} else {
myswprintf(textBuffer, L"%ls", dataManager.GetName(ptr->first));
DrawShadowText(textFont, textBuffer, Resize(860, 165 + i * 66, 955, 185 + i * 66), Resize(1, 1, 0, 0));
const wchar_t* ptype = dataManager.FormatType(ptr->second.type);
DrawShadowText(textFont, ptype, Resize(860, 187 + i * 66, 955, 207 + i * 66), Resize(1, 1, 0, 0));
textBuffer[0] = 0;
if((ptr->second.ot & AVAIL_OCGTCG) == AVAIL_OCG)
wcscat(textBuffer, L"[OCG]");
else if((ptr->second.ot & AVAIL_OCGTCG) == AVAIL_TCG)
wcscat(textBuffer, L"[TCG]");
else if((ptr->second.ot & AVAIL_CUSTOM) == AVAIL_CUSTOM)
wcscat(textBuffer, L"[Custom]");
DrawShadowText(textFont, textBuffer, Resize(860, 209 + i * 66, 955, 229 + i * 66), Resize(1, 1, 0, 0));
myswprintf(textBuffer, L"%ls/%ls LINK-%d", dataManager.FormatAttribute(ptr->second.attribute), dataManager.FormatRace(ptr->second.race), ptr->second.level);
DrawShadowText(textFont, textBuffer, Resize(860, 187 + i * 66, 955, 207 + i * 66), Resize(1, 1, 0, 0));
if(ptr->second.attack < 0)
myswprintf(textBuffer, L"?/-");
else myswprintf(textBuffer, L"%d/-", ptr->second.attack);
}
if(ptr->second.type & TYPE_PENDULUM) {
wchar_t scaleBuffer[16];
myswprintf(scaleBuffer, L" %d/%d", ptr->second.lscale, ptr->second.rscale);
wcscat(textBuffer, scaleBuffer);
}
if((ptr->second.ot & AVAIL_OCGTCG) == AVAIL_OCG)
wcscat(textBuffer, L" [OCG]");
else if((ptr->second.ot & AVAIL_OCGTCG) == AVAIL_TCG)
wcscat(textBuffer, L" [TCG]");
else if((ptr->second.ot & AVAIL_CUSTOM) == AVAIL_CUSTOM)
wcscat(textBuffer, L" [Custom]");
DrawShadowText(textFont, textBuffer, Resize(860, 209 + i * 66, 955, 229 + i * 66), Resize(1, 1, 0, 0));
} else {
myswprintf(textBuffer, L"%ls", dataManager.GetName(ptr->first));
DrawShadowText(textFont, textBuffer, Resize(860, 165 + i * 66, 955, 185 + i * 66), Resize(1, 1, 0, 0));
const wchar_t* ptype = dataManager.FormatType(ptr->second.type);
DrawShadowText(textFont, ptype, Resize(860, 187 + i * 66, 955, 207 + i * 66), Resize(1, 1, 0, 0));
textBuffer[0] = 0;
if((ptr->second.ot & AVAIL_OCGTCG) == AVAIL_OCG)
wcscat(textBuffer, L"[OCG]");
else if((ptr->second.ot & AVAIL_OCGTCG) == AVAIL_TCG)
wcscat(textBuffer, L"[TCG]");
else if((ptr->second.ot & AVAIL_CUSTOM) == AVAIL_CUSTOM)
wcscat(textBuffer, L"[Custom]");
DrawShadowText(textFont, textBuffer, Resize(860, 209 + i * 66, 955, 229 + i * 66), Resize(1, 1, 0, 0));
}
}
if(deckBuilder.is_draging) {
......
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