Decompile fn_03880 (UIChangeMaterialWnd_List::Paint)
Batch #16588 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_03880 UIChangeMaterialWnd_List::Paint: logic confirmed by peer review Peer-reviewed-by: Yommy, alisonrag, br4yan Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
10f2803c9a
commit
eb5f9b601c
1 changed files with 7 additions and 15 deletions
|
|
@ -560,14 +560,7 @@ void UIChangeMaterialWnd_List::Paint() {
|
|||
|
||||
for (int row = 0; row < this->m_pageSize; ++row) {
|
||||
const int index = row + this->m_scrollOffset;
|
||||
const MaterialListEntry* entry = nullptr;
|
||||
if (static_cast<unsigned int>(index) < this->m_items.size()) {
|
||||
const unsigned int entryIndex = static_cast<unsigned int>(this->m_items[index]);
|
||||
if (entryIndex < this->m_entries.size()) {
|
||||
entry = &this->m_entries[entryIndex];
|
||||
}
|
||||
}
|
||||
|
||||
const MaterialListEntry* entry = this->GetEntry(index);
|
||||
if (entry) {
|
||||
const char* bitmap;
|
||||
if (index == this->m_selectedIndex) {
|
||||
|
|
@ -591,15 +584,14 @@ void UIChangeMaterialWnd_List::Paint() {
|
|||
name = this->FitDisplayText(100, name.c_str(), 0, 12, 0);
|
||||
}
|
||||
|
||||
const int y = this->rowHeight * row;
|
||||
if (entry->state == 1) {
|
||||
DrawItemWithQuantity(*this, ResourceMgr::Instance(), 0, y, item, 1, 0);
|
||||
this->DrawTextAt(30, y + 6, name.c_str(), 0, 0, 12, 0, 0, 0);
|
||||
this->DrawRightAlignedText(163, y + 6, FormatOwnedString(LookupMessage(MSI_EA), item.quantity).c_str(), 0, 0, 12, 0, 0);
|
||||
DrawItemWithQuantity(*this, ResourceMgr::Instance(), 0, this->rowHeight * row, item, 1, 0);
|
||||
this->DrawTextAt(30, this->rowHeight * row + 6, name.c_str(), 0, 0, 12, 0, 0, 0);
|
||||
this->DrawRightAlignedText(163, this->rowHeight * row + 6, FormatOwnedString(LookupMessage(MSI_EA), item.quantity).c_str(), 0, 0, 12, 0, 0);
|
||||
} else {
|
||||
DrawItemWithQuantityAuxiliary(*this, 1, 0, y, item, 1, 0);
|
||||
this->DrawTextAt(30, y + 6, name.c_str(), 0, 0, 12, 0xAAAAAA, 0, 0);
|
||||
this->DrawRightAlignedText(163, y + 6, FormatOwnedString(LookupMessage(MSI_EA), item.quantity).c_str(), 0, 0, 12, 0xAAAAAA, 0);
|
||||
DrawItemWithQuantityAuxiliary(*this, 1, 0, this->rowHeight * row, item, 1, 0);
|
||||
this->DrawTextAt(30, this->rowHeight * row + 6, name.c_str(), 0, 0, 12, 0xAAAAAA, 0, 0);
|
||||
this->DrawRightAlignedText(163, this->rowHeight * row + 6, FormatOwnedString(LookupMessage(MSI_EA), item.quantity).c_str(), 0, 0, 12, 0xAAAAAA, 0);
|
||||
}
|
||||
} else {
|
||||
CRes* disabled = ResourceMgr::Instance().Load(Resolve("유저인터페이스\\ChangeMaterial\\btn_material_disable.bmp"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue