Decompile 7 functions in Source/UI/UIItemReformWnd.cpp, Source/UI/UIItemReformWnd.h, ...
Batch #3896 by youko: 0 byte-identical, 7 confirmed by peer review. - fn_04107 UIItemReformWnd_List::Move: logic confirmed by peer review - fn_04111 UIItemReformWnd_DetailBtn::Paint: logic confirmed by peer review - fn_04112 UIItemReformWnd_DetailMsg::Paint: logic confirmed by peer review - fn_04113 UIItemReformWnd_Item::Paint: logic confirmed by peer review - fn_04117 UIItemReformWnd_List::Slot31: logic confirmed by peer review - fn_04120 UIItemReformWnd_List::Slot28: logic confirmed by peer review - fn_04127 UIItemReformWnd_List::Slot35: logic confirmed by peer review Peer-reviewed-by: eAthena, Yommy, superintelligence, willerthal 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
c9bdfc7e57
commit
9601ac1f5e
1 changed files with 59 additions and 0 deletions
|
|
@ -13,14 +13,56 @@
|
|||
#include <string>
|
||||
|
||||
// OFFSET: 0x005FCD10
|
||||
// FUNCTION: fn_04107
|
||||
void UIItemReformWnd_List::Move(int x, int y) {
|
||||
UIWindow::Move(x, y);
|
||||
}
|
||||
|
||||
// OFFSET: 0x005FD600
|
||||
// FUNCTION: fn_04111
|
||||
void UIItemReformWnd_DetailBtn::Paint() {
|
||||
this->ClearSurface(0xFFFF00FF);
|
||||
std::string text = LookupMessage(3854);
|
||||
UIButtonContext& controls = *this->m_buttonContext;
|
||||
const unsigned int textWidth = this->TextWidth(controls.fonts, controls.locale, text.c_str(), 0, 0, 12, 0, 0);
|
||||
this->DrawCenteredText(0, 0, text.c_str(), this->geometry.width, 0, 12, 0, 0);
|
||||
this->FillRegion((this->geometry.width - textWidth) * 0.5, 12, textWidth, 1, 0);
|
||||
}
|
||||
|
||||
// OFFSET: 0x005FD770
|
||||
// FUNCTION: fn_04112
|
||||
void UIItemReformWnd_DetailMsg::Paint() {
|
||||
this->ClearSurface(0xFFFF00FF);
|
||||
DrawFilledRoundedBorder(*this, 0, 0, this->geometry.width, this->geometry.height, 0xFFFFFF);
|
||||
DrawRoundedBorder(*this, 2, 2, this->geometry.width - 4, this->geometry.height - 4, 0xC8C8C8);
|
||||
this->FillRegion(8, 8, this->geometry.width - 16, this->geometry.height - 16, 0xF7F7F7);
|
||||
}
|
||||
|
||||
// OFFSET: 0x005FD7E0
|
||||
// FUNCTION: fn_04113
|
||||
void UIItemReformWnd_Item::Paint() {
|
||||
this->ClearSurface(0xFFFF00FF);
|
||||
if (this->item) {
|
||||
ResourceMgr& resources = ResourceMgr::Instance();
|
||||
const std::string name = FormatOwnedString("유저인터페이스\\item\\%s.bmp", ItemResourcePath(*this->item));
|
||||
CBitmapRes* bitmap = static_cast<CBitmapRes*>(resources.Load(Resolve(name.c_str())));
|
||||
this->DrawBitmap(0, 0, bitmap ? &bitmap->image : nullptr, true);
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x005FDA60
|
||||
// FUNCTION: fn_04117
|
||||
void UIItemReformWnd_List::Slot31(int x, int y) {
|
||||
const unsigned int count = this->items.size();
|
||||
const unsigned int index = std::max(0u, std::min(y / this->itemHeight + this->scrollPosition, count - 1));
|
||||
if (index < count && this->selectedIndex != index) {
|
||||
this->selectedIndex = index;
|
||||
if (this->parent) {
|
||||
this->parent->SendMsg(nullptr, 6, 336, reinterpret_cast<std::intptr_t>(&this->items[index]), 0, 0);
|
||||
}
|
||||
this->Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x005FDB00
|
||||
// FUNCTION: fn_04118
|
||||
|
|
@ -31,6 +73,15 @@ void UIItemReformWnd_DetailBtn::Slot47() {
|
|||
}
|
||||
|
||||
// OFFSET: 0x005FDBE0
|
||||
// FUNCTION: fn_04120
|
||||
void UIItemReformWnd_List::Slot28(int x, int y) {
|
||||
const unsigned int count = this->items.size();
|
||||
const unsigned int index = std::max(0u, std::min(y / this->itemHeight + this->scrollPosition, count - 1));
|
||||
if (index < count && this->hoverIndex != index) {
|
||||
this->hoverIndex = index;
|
||||
this->Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x005FDC50
|
||||
// FUNCTION: fn_04121
|
||||
|
|
@ -41,3 +92,11 @@ void UIItemReformWnd_DetailBtn::Slot48() {
|
|||
}
|
||||
|
||||
// OFFSET: 0x005FDDA0
|
||||
// FUNCTION: fn_04127
|
||||
void UIItemReformWnd_List::Slot35(int delta) {
|
||||
if (delta < 0) {
|
||||
this->SendMsg(this->scrollBar, 10, 0, 0, 0, 0);
|
||||
} else {
|
||||
this->SendMsg(this->scrollBar, 9, 0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue