diff --git a/Source/UI/UIItemReformWnd.cpp b/Source/UI/UIItemReformWnd.cpp index aa1c0eda..b760fa2d 100644 --- a/Source/UI/UIItemReformWnd.cpp +++ b/Source/UI/UIItemReformWnd.cpp @@ -1,16 +1,34 @@ #include "UI/UIItemReformWnd.h" +#include "Client/Input/InputCharset.h" +#include "Client/Input/Mouse.h" +#include "Client/Mode/ModeMgr.h" +#include "Client/Mode/ModeTooltip.h" +#include "Client/Session.h" +#include "Contents/Configuration/ServiceConfiguration.h" +#include "Contents/Items/ItemDescription.h" #include "Contents/Items/ItemNaming.h" +#include "Contents/Items/ItemReformMgr.h" +#include "Contents/Items/SelectPackageItemMgr.h" #include "Contents/MessageTable.h" +#include "Contents/PlayerNameDictionary.h" #include "Resource/Bitmap/BitmapResource.h" #include "Resource/ResourceMgr.h" #include "Resource/TextureNames.h" +#include "UI/Buttons/UIBasicButton.h" +#include "UI/Shop/ItemDrawing.h" +#include "UI/Window/UIWindowMgr.h" #include "UI/Window/WindowBorder.h" #include "UI/Window/WindowManagerWindows.h" +#include "UI/Window/WindowOrdering.h" #include "Utility/Text/FormatString.h" #include #include +#include +#include +#include +#include #include // OFFSET: 0x005FCD10 @@ -30,6 +48,8 @@ void UIItemReformWnd_List::Slot15(int width, int height) { this->UpdateScrollBar(); } +// OFFSET: 0x005FD270 + // OFFSET: 0x005FD600 // FUNCTION: fn_04111 void UIItemReformWnd_DetailBtn::Paint() { @@ -62,6 +82,8 @@ void UIItemReformWnd_Item::Paint() { } } +// OFFSET: 0x005FD8A0 + // OFFSET: 0x005FDA60 // FUNCTION: fn_04117 void UIItemReformWnd_List::Slot31(int x, int y) { @@ -84,6 +106,8 @@ void UIItemReformWnd_DetailBtn::Slot47() { } } +// OFFSET: 0x005FDB20 + // OFFSET: 0x005FDBE0 // FUNCTION: fn_04120 void UIItemReformWnd_List::Slot28(int x, int y) { @@ -103,6 +127,25 @@ void UIItemReformWnd_DetailBtn::Slot48() { } } +// OFFSET: 0x005FDC80 +// FUNCTION: fn_04123 +void UIItemReformWnd::Slot19() { + if (this->detailMsg) { + reinterpret_cast(g_windowMgr).Promote(this->detailMsg); + this->detailMsg->Move(g_mouse.x + 5, g_mouse.y + 5); + } +} + +// OFFSET: 0x005FDCC0 +// FUNCTION: fn_04124 +void UIItemReformWnd_Item::Slot32(int x, int y) { + if (this->item) { + if (UIWindow* window = g_windowMgr.EnsureWindow(12)) { + window->SendMsg(nullptr, 24, reinterpret_cast(this->item), 0, 0, 0); + } + } +} + // OFFSET: 0x005FDD10 // FUNCTION: fn_04126 void UIItemReformWnd_List::Slot33(int x, int y) { @@ -144,3 +187,5 @@ void UIItemReformWnd_List::UpdateScrollBar() { this->parent->Invalidate(); } } + +// OFFSET: 0x005FDEA0 diff --git a/Source/UI/UIItemReformWnd.h b/Source/UI/UIItemReformWnd.h index 3de72a92..c1af692c 100644 --- a/Source/UI/UIItemReformWnd.h +++ b/Source/UI/UIItemReformWnd.h @@ -6,12 +6,16 @@ #include "UI/Lists/UIScrollBar.h" #include "UI/Window/UIFrameWnd.h" +#include #include +class UIBasicButton; + class UIItemReformWnd_List : public UIFrameWnd { public: void Move(int x, int y) override; void Slot15(int width, int height) override; + void Paint() override; void Slot28(int x, int y) override; void Slot31(int x, int y) override; void Slot33(int x, int y) override; @@ -31,6 +35,8 @@ public: class UIItemReformWnd_Item : public UIWindow { public: void Paint() override; + void Slot28(int x, int y) override; + void Slot32(int x, int y) override; /* 007C */ ITEM_INFO* item; }; @@ -47,4 +53,25 @@ public: void Paint() override; }; +class UIItemReformWnd : public UIFrameWnd { +public: + void Slot19() override; + void Paint() override; + void SelectItem(ITEM_INFO* item); + + /* 00B4 */ UIBasicButton* reformButton; + /* 00B8 */ UIItemReformWnd_List* list; + /* 00BC */ UIItemReformWnd_Item* baseIcon; + /* 00C0 */ UIItemReformWnd_Item* resultIcon; + /* 00C4 */ std::vector materialIcons; + /* 00D0 */ UIItemReformWnd_DetailBtn* detailButton; + /* 00D4 */ UIItemReformWnd_DetailMsg* detailMsg; + /* 00D8 */ ITEM_INFO reformItem; + /* 01D0 */ ITEM_INFO* selectedItem; + /* 01D8 */ ITEM_INFO resultItem; + /* 02D0 */ std::vector materials; + /* 02DC */ std::string information; + /* 02F4 */ std::string warning; +}; + #endif