Batch #4958 by Yommy: 1 byte-identical, 5 confirmed by peer review. - fn_15287 CUIExchangeUI::Conclude: logic confirmed by peer review - fn_15299 ExchangeUI::CUIItem::Slot16: logic confirmed by peer review - fn_15300 ExchangeUI::CUIItem::Slot28: logic confirmed by peer review - fn_15302 ExchangeUI::CUIItem::Slot32: logic confirmed by peer review - fn_15303 CUIListBoxEx<ExchangeUI::CUIItem,ExchangeUI::CItemData>::UpdateScrollBar: byte-identical - fn_15308 CUIExchangeUI::FreezeItems: logic confirmed by peer review Peer-reviewed-by: eAthena, youko Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
80 lines
2.4 KiB
C++
80 lines
2.4 KiB
C++
#ifndef RAGNAROK_SOURCE_UI_EXCHANGE_UIEXCHANGEUI_H
|
|
#define RAGNAROK_SOURCE_UI_EXCHANGE_UIEXCHANGEUI_H
|
|
|
|
#include "Contents/Items/ItemInfo.h"
|
|
#include "UI/FrameSkin.h"
|
|
#include "UI/Items/UIGameItem.h"
|
|
#include "UI/Lists/UIListBoxTemplate.h"
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
#include <string>
|
|
|
|
class CUICheckBox;
|
|
|
|
namespace ExchangeUI {
|
|
class CUIItem : public CUIListItem {
|
|
public:
|
|
/* 00E8 */ UIWindow* unknown_00E8;
|
|
/* 00EC */ CUIGameItem* itemIcon;
|
|
|
|
void Paint() override;
|
|
void Slot16() override;
|
|
void Slot28(int x, int y) override;
|
|
void Slot32(int x, int y) override;
|
|
};
|
|
|
|
class CItemData {
|
|
public:
|
|
/* 0000 */ ITEM_INFO item;
|
|
/* 00F8 */ int unknown_00F8;
|
|
/* 00FC */ bool frozen;
|
|
};
|
|
|
|
using CItemListBox = CUIListBoxEx<CUIItem, CItemData>;
|
|
}
|
|
|
|
class CUIExchangeUI : public CUIFrameWnd {
|
|
public:
|
|
/* 00D8 */ CUITitleBar* titleBar;
|
|
/* 00DC */ CUIStaticText* unknown_00DC;
|
|
/* 00E0 */ CUIStaticImage* unknown_00E0;
|
|
/* 00E4 */ ExchangeUI::CItemListBox* firstList;
|
|
/* 00E8 */ UIWindow* unknown_00E8;
|
|
/* 00EC */ UIWindow* unknown_00EC;
|
|
/* 00F0 */ UIWindow* unknown_00F0;
|
|
/* 00F4 */ UIWindow* unknown_00F4;
|
|
/* 00F8 */ ExchangeUI::CItemListBox* secondList;
|
|
/* 00FC */ UIWindow* unknown_00FC;
|
|
/* 0100 */ UIWindow* unknown_0100;
|
|
/* 0104 */ UIWindow* unknown_0104;
|
|
/* 0108 */ CUICheckBox* logCheckBox;
|
|
/* 010C */ UIWindow* unknown_010C;
|
|
/* 0110 */ CUIImageButton* lockButton;
|
|
/* 0114 */ CUIImageButton* tradeButton;
|
|
/* 0118 */ UIWindow* unknown_0118;
|
|
/* 011C */ std::string partnerName;
|
|
|
|
void Slot10(int x, int y, std::intptr_t value) override;
|
|
|
|
void Conclude();
|
|
void FreezeItems(bool mine);
|
|
|
|
void OnCheckChanged(bool checked);
|
|
void OnEditSubmit();
|
|
void OnSelectFirstListItem(ExchangeUI::CUIItem* item, const ExchangeUI::CItemData& data);
|
|
void OnSelectSecondListItem(ExchangeUI::CUIItem* item, const ExchangeUI::CItemData& data);
|
|
};
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(ExchangeUI::CItemData) == 0x100);
|
|
static_assert(offsetof(ExchangeUI::CItemData, frozen) == 0xFC);
|
|
static_assert(offsetof(ExchangeUI::CItemListBox, imageNames) == 0x90);
|
|
static_assert(offsetof(ExchangeUI::CItemListBox, disabledName) == 0x98);
|
|
static_assert(offsetof(ExchangeUI::CItemListBox, scrollBar) == 0xB0);
|
|
static_assert(offsetof(ExchangeUI::CItemListBox, data) == 0xD4);
|
|
static_assert(offsetof(ExchangeUI::CItemListBox, onSelect) == 0xE8);
|
|
static_assert(offsetof(ExchangeUI::CItemListBox, binder) == 0x110);
|
|
#endif
|
|
|
|
#endif
|