Batch #18338 by ragnarok-clanker: no function's compiled code changes; checked with 433 compiled unit(s), including every includer of Source/Client/Application/ApplicationWindow.h, Source/Client/Mode/CGameMode.h, Source/Client/Session/Session.h, Source/Contents/Configuration/ServiceOptions.h, Source/Contents/Map/MapSkyMgr.h, Source/Contents/Messenger/ClientMessenger.h, Source/Contents/SignBoard/SignBoard.h, Source/Contents/Skills/ClientSkills.h, Source/Contents/Sound/SoundConfiguration.h, Source/Render/DX7/RenderSystemDX7.h, Source/Render/Device/DisplayMode.h, Source/Resource/Json/JsonCppLoader.h, Source/Security/NProtectGameGuardMgr.h, Source/UI/Cooldowns/CooldownOwner.h, Source/UI/Enchant/EnchantUI.h, Source/UI/Exchange/UIExchangeUI.h, Source/UI/GameSettings/GameSettingsUI.h, Source/UI/ProbabilityTable/UIProbabilityTable.h, Source/UI/Quest/UIOngoingQuestInfo.h, Source/UI/RuneSystem/UIRuneSystemWnd.h, Source/UI/SelectPackageItemBox/SelectPackageItemBox.h, Source/UI/SkillDelayInfo/SkillDelayInfo.h, Source/UI/Text/TextWrapping.h, Source/Contents/Actors/Resources/BodyResources.h, Source/Resource/Json/JsonCppLoaderExternal.h, Source/Resource/Json/JsonCppLoaderParsing.h, Source/Security/NProtectGameMon.h.
93 lines
2.9 KiB
C++
93 lines
2.9 KiB
C++
#ifndef RAGNAROK_SOURCE_UI_PROBABILITYTABLE_UIPROBABILITYTABLE_H
|
|
#define RAGNAROK_SOURCE_UI_PROBABILITYTABLE_UIPROBABILITYTABLE_H
|
|
|
|
#include "UI/Window/FrameSkin.h"
|
|
#include "UI/Lists/UIListBoxTemplate.h"
|
|
#include "UI/Text/UITextViewerControl.h"
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
#include <string_view>
|
|
|
|
namespace ProbabilityTable {
|
|
|
|
class CItemData {
|
|
public:
|
|
/* 0000 */ std::uint32_t color = 0xFFFFFFFF;
|
|
/* 0004 */ std::string name;
|
|
/* 001C */ int padding_001C;
|
|
/* 0020 */ double probability = 0.0;
|
|
};
|
|
|
|
class CUIItem : public CUIListItem {
|
|
public:
|
|
CUIItem();
|
|
void OnCreate(int width, int height) override;
|
|
void OnInit() override;
|
|
void Paint() override;
|
|
void OnLBtnDown(int x, int y) override;
|
|
|
|
/* 00E8 */ CUITextViewer* nameText;
|
|
/* 00EC */ CUITextViewer* probabilityText;
|
|
/* 00F0 */ std::uint32_t backgroundColor;
|
|
/* 00F4 */ unsigned char padding_00F4[0x04];
|
|
};
|
|
|
|
}
|
|
class CUIEditBoxEx;
|
|
class CUIImageButton;
|
|
class CUITitleBar;
|
|
class CUIStaticText;
|
|
class CUIProbabilityTable : public CUIFrameWnd {
|
|
public:
|
|
__declspec(noinline) CUIProbabilityTable();
|
|
|
|
void OnCreate(int width, int height) override;
|
|
void OnInit() override;
|
|
void Paint() override;
|
|
virtual void Initialize();
|
|
int SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) override;
|
|
void OnButtonClick();
|
|
void OnClose();
|
|
void OnPrepareItem(ProbabilityTable::CUIItem* item, const ProbabilityTable::CItemData& data);
|
|
void BindItem(ProbabilityTable::CUIItem* item, const ProbabilityTable::CItemData& data);
|
|
void Search();
|
|
void SetItem(int itemId);
|
|
|
|
/* 00D8 */ CUITitleBar* m_titleBar;
|
|
/* 00DC */ CUIStaticText* m_nameHeader;
|
|
/* 00E0 */ CUIEditBoxEx* m_searchEdit;
|
|
union {
|
|
/* 00E4 */ unsigned char m_searchButtonStorage[0x04];
|
|
/* 00E4 */ CUIImageButton* m_searchButton;
|
|
};
|
|
/* 00E8 */ CUIStaticText* m_itemName;
|
|
/* 00EC */ CUIStaticText* m_probabilityHeader;
|
|
/* 00F0 */ CUIListBoxEx<ProbabilityTable::CUIItem, ProbabilityTable::CItemData>* m_list;
|
|
/* 00F4 */ std::string m_lastSearch;
|
|
/* 010C */ int m_itemId;
|
|
};
|
|
|
|
int HighlightKeyword(std::string& text, std::string_view keyword, std::string_view prefix, std::string_view suffix);
|
|
|
|
template <>
|
|
void CUIListBoxEx<ProbabilityTable::CUIItem, ProbabilityTable::CItemData>::OnScroll(int position);
|
|
|
|
template <>
|
|
bool CUIListBoxEx<ProbabilityTable::CUIItem, ProbabilityTable::CItemData>::RebindIndex(int index);
|
|
|
|
template <>
|
|
void CUIListBoxEx<ProbabilityTable::CUIItem, ProbabilityTable::CItemData>::AddNewItem();
|
|
|
|
template <>
|
|
void CUIListBoxEx<ProbabilityTable::CUIItem, ProbabilityTable::CItemData>::LoadSkin(bool resolveSkin);
|
|
|
|
template <>
|
|
void CUIListBoxEx<ProbabilityTable::CUIItem, ProbabilityTable::CItemData>::Resize(int width, int height);
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(ProbabilityTable::CItemData) == 0x28);
|
|
static_assert(sizeof(ProbabilityTable::CUIItem) == 0xF8);
|
|
#endif
|
|
|
|
#endif
|