diff --git a/Source/UI/SkillDelayInfo/SkillDelayInfo.h b/Source/UI/SkillDelayInfo/SkillDelayInfo.h new file mode 100644 index 00000000..46a95b78 --- /dev/null +++ b/Source/UI/SkillDelayInfo/SkillDelayInfo.h @@ -0,0 +1,53 @@ +#ifndef RAGNAROK_SOURCE_UI_SKILLDELAYINFO_SKILLDELAYINFO_H +#define RAGNAROK_SOURCE_UI_SKILLDELAYINFO_SKILLDELAYINFO_H + +#include "UI/FrameSkin.h" +#include "UI/Lists/UIListBoxTemplate.h" +#include "UI/Window/UIControl.h" + +#include +#include +#include + +namespace SkillDelayInfo { +class CDelayItemData { +public: + /* 0000 */ int unknown_0000; + /* 0004 */ std::map unknown_0004; +}; + +class CUIDelayItem : public CUIListItem { +public: + void Slot16() override; + void Paint() override; + + /* 00E8 */ unsigned char unknown_00E8[0x10]; + /* 00F8 */ std::uint32_t backgroundColor; + /* 00FC */ std::uint32_t borderColor; +}; + +class CUITime : public CUIControl { +public: + ~CUITime() override; + void Slot16() override; + void Paint() override; + + /* 0080 */ UIWindow* text; +}; +} + +class CUISkillDelayInfo : public CUIFrameWnd { +public: + void Paint() override; + + /* 00D8 */ unsigned char unknown_00D8[0x2C]; + /* 0104 */ std::uint32_t backgroundColor; + /* 0108 */ std::uint32_t borderColor; + /* 010C */ int skillId; +}; + +#if defined(_WIN32) && !defined(_WIN64) +static_assert(sizeof(SkillDelayInfo::CDelayItemData) == 0x0C); +#endif + +#endif diff --git a/Source/UI/SkillDelayInfo/UISkillDelayInfo.cpp b/Source/UI/SkillDelayInfo/UISkillDelayInfo.cpp new file mode 100644 index 00000000..e0ec0680 --- /dev/null +++ b/Source/UI/SkillDelayInfo/UISkillDelayInfo.cpp @@ -0,0 +1,59 @@ +#include "UI/SkillDelayInfo/SkillDelayInfo.h" +#include "Resource/ResourceMgr.h" +#include "Resource/SkinPalette.h" +#include "UI/Window/WindowBorder.h" + +namespace SkillDelayInfo { +// OFFSET: 0x00A778C0 +// FUNCTION: fn_16877 +CUITime::~CUITime() = default; + +// OFFSET: 0x00A77CE0 +// FUNCTION: fn_16882 +void CUIDelayItem::Paint() { + this->backgroundColor = SkinPaletteColor(ResourceMgr::Instance(), SkinPaletteCell{0, 2}, true); + this->borderColor = SkinPaletteColor(ResourceMgr::Instance(), SkinPaletteCell{6, 2}, true); + DrawRectangleBorder(*this, 0, 0, 325, 22, this->borderColor); + this->FillRegion(1, 0, 43, 21, this->backgroundColor); + this->FillRegion(44, 0, 280, 21, 0xFFFFFF); + DrawRectangleBorder(*this, 44, 0, 1, 21, this->borderColor); + DrawRectangleBorder(*this, 114, 0, 1, 21, this->borderColor); + DrawRectangleBorder(*this, 184, 0, 1, 21, this->borderColor); + DrawRectangleBorder(*this, 254, 0, 1, 21, this->borderColor); +} + +// OFFSET: 0x00A77F00 +// FUNCTION: fn_16884 +void CUITime::Paint() { + this->ClearSurface(0xFFFF00FF); +} + +// OFFSET: 0x00A77F10 +// FUNCTION: fn_16885 +void CUIDelayItem::Slot16() { + this->backgroundColor = SkinPaletteColor(ResourceMgr::Instance(), SkinPaletteCell{0, 2}, true); + this->borderColor = SkinPaletteColor(ResourceMgr::Instance(), SkinPaletteCell{6, 2}, true); +} + +// OFFSET: 0x00A78180 +// FUNCTION: fn_16887 +void CUITime::Slot16() { +} +} + +// OFFSET: 0x00A77DD0 +// FUNCTION: fn_16883 +void CUISkillDelayInfo::Paint() { + CUIFrameWnd::Paint(); + this->backgroundColor = SkinPaletteColor(ResourceMgr::Instance(), SkinPaletteCell{0, 2}, true); + this->borderColor = SkinPaletteColor(ResourceMgr::Instance(), SkinPaletteCell{6, 2}, true); + this->FillRegion(11, 28, 323, 23, this->backgroundColor); + DrawRectangleBorder(*this, 10, 27, 325, 25, this->borderColor); + DrawRectangleBorder(*this, 10, 58, 325, 46, this->borderColor); + this->FillRegion(11, 59, 323, 44, this->backgroundColor); + DrawRectangleBorder(*this, 11, 81, 323, 1, this->borderColor); + DrawRectangleBorder(*this, 54, 59, 1, 44, this->borderColor); + DrawRectangleBorder(*this, 194, 59, 1, 44, this->borderColor); + DrawRectangleBorder(*this, 124, 83, 1, 21, this->borderColor); + DrawRectangleBorder(*this, 264, 83, 1, 21, this->borderColor); +} diff --git a/data/compile.json b/data/compile.json index e2e77321..99418697 100644 --- a/data/compile.json +++ b/data/compile.json @@ -744,6 +744,7 @@ "Source/UI/Shortcuts/ShortcutTooltip.cpp": 2, "Source/UI/Shortcuts/ShortcutVisibility.cpp": 2, "Source/UI/Shortcuts/UIShortCutWnd.cpp": 2, + "Source/UI/SkillDelayInfo/UISkillDelayInfo.cpp": 2, "Source/UI/Text/ColoredText.cpp": 2, "Source/UI/Text/ItemLinkDisplay.cpp": 2, "Source/UI/Text/NavigationLink.cpp": 2,