rodecomp/Source/UI/UIChangeMaterialWnd.cpp

29 lines
771 B
C++

#include "UI/UIChangeMaterialWnd.h"
// OFFSET: 0x005E1120
// FUNCTION: fn_03872
ITEM_INFO* UIChangeMaterialWnd::GetItemAt(int x, int y) {
if (this->m_resultX <= x && x <= this->m_resultX + 24 && this->m_resultY <= y && y <= this->m_resultY + 24) {
return &this->m_resultItem;
}
for (unsigned int i = 0; i < this->m_materials.size(); ++i) {
const MaterialSlotPos& pos = this->m_materialPos[i];
if (pos.x <= x && x <= pos.x + 24 && pos.y <= y && y <= pos.y + 24) {
return &this->m_materials[i];
}
}
return nullptr;
}
// OFFSET: 0x005E1300
// FUNCTION: fn_03874
bool UIChangeMaterialWnd::Slot02() {
return true;
}
// OFFSET: 0x005E1310
// FUNCTION: fn_03875
void UIChangeMaterialWnd_List::Move(int x, int y) {
UIWindow::Move(x, y);
}