Batch #16491 by eAthena: 24 byte-identical, 0 confirmed by peer review. - fn_13991 CUIAdventureGuide::Initialize: byte-identical - fn_14272 CUIAdventureGuide::CUIAdventureGuide: byte-identical (already on main) - fn_14752 CUIEnchantUI::Initialize: byte-identical - fn_14808 CreateEnchantUI: byte-identical (already on main) - fn_15033 CUIEquipmentPropertiesWnd::Initialize: byte-identical - fn_15151 CUIEquipmentPropertiesWnd::CUIEquipmentPropertiesWnd: byte-identical (already on main) - fn_15189 CUIExchangeUI::Initialize: byte-identical - fn_15282 CUIExchangeUI::CUIExchangeUI: byte-identical (already on main) - fn_15383 CUIGameSettingsUI::Initialize: byte-identical - fn_15888 CUIGameSettingsUI::CUIGameSettingsUI: byte-identical (already on main) - fn_16052 CUIMacroReport::Initialize: byte-identical - fn_16096 CUIMacroReport::CUIMacroReport: byte-identical (already on main) - fn_16116 CUIProbabilityTable::Initialize: byte-identical - fn_16191 CUIProbabilityTable::CUIProbabilityTable: byte-identical (already on main) - fn_16224 CUIOngoingQuestInfo::Initialize: byte-identical - fn_16290 CUIOngoingQuestInfo::CUIOngoingQuestInfo: byte-identical (already on main) - fn_16321 CUIRecommendedQuestInfo::Initialize: byte-identical - fn_16340 CUIRecommendedQuestInfo::CUIRecommendedQuestInfo: byte-identical (already on main) - fn_16432 CUIRenewQuestUI::Initialize: byte-identical - fn_16599 CUIRenewQuestUI::CUIRenewQuestUI: byte-identical (already on main) - fn_16661 CUISelectPackageItemBox::Initialize: byte-identical - fn_16772 CUISelectPackageItemBox::CUISelectPackageItemBox: byte-identical (already on main) - fn_16807 CUISkillDelayInfo::Initialize: byte-identical - fn_16872 CUISkillDelayInfo::CUISkillDelayInfo: byte-identical (already on main) Merged automatically: every function is byte-identical to the original.
86 lines
3.2 KiB
C++
86 lines
3.2 KiB
C++
#include "UI/FrameSkin.h"
|
|
#include "Resource/ResourceMgr.h"
|
|
#include "Resource/TextureNames.h"
|
|
#include "UI/Window/UIRegisterMgr.h"
|
|
#include "UI/Window/WindowBorder.h"
|
|
|
|
#include <new>
|
|
#include <utility>
|
|
|
|
// GLOBAL: gl_25106
|
|
template <>
|
|
CUIRegisterMgr* Singleton<CUIRegisterMgr>::s_instance = nullptr;
|
|
|
|
// OFFSET: 0x009E69D0
|
|
// FUNCTION: fn_14469
|
|
CUIFrameWnd::~CUIFrameWnd() {
|
|
if (this->m_ownsBackgroundColor) {
|
|
if (CUIRegisterMgr::s_instance == nullptr) {
|
|
CUIRegisterMgr::s_instance = new (std::nothrow) CUIRegisterMgr;
|
|
}
|
|
std::map<int, std::pair<int, int>>& positions = CUIRegisterMgr::s_instance->windowPositions;
|
|
std::map<int, std::pair<int, int>>::iterator position = positions.lower_bound(this->geometry.id);
|
|
if (position == positions.end() || this->geometry.id < position->first) {
|
|
position = positions.insert(position, std::map<int, std::pair<int, int>>::value_type(this->geometry.id, std::pair<int, int>()));
|
|
}
|
|
position->second.first = this->geometry.x;
|
|
position->second.second = this->geometry.y;
|
|
}
|
|
|
|
if (this->m_ownsBorderColor) {
|
|
if (CUIRegisterMgr::s_instance == nullptr) {
|
|
CUIRegisterMgr::s_instance = new (std::nothrow) CUIRegisterMgr;
|
|
}
|
|
std::map<int, std::pair<int, int>>& sizes = CUIRegisterMgr::s_instance->windowSizes;
|
|
std::map<int, std::pair<int, int>>::iterator size = sizes.lower_bound(this->geometry.id);
|
|
if (size == sizes.end() || this->geometry.id < size->first) {
|
|
size = sizes.insert(size, std::map<int, std::pair<int, int>>::value_type(this->geometry.id, std::pair<int, int>()));
|
|
}
|
|
size->second.first = this->geometry.width;
|
|
size->second.second = this->geometry.height;
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x009E6C70
|
|
// FUNCTION: fn_14470
|
|
void CUIFrameWnd::RefreshSkinColors() {
|
|
if (!this->m_resolveSkin) {
|
|
return;
|
|
}
|
|
|
|
if (this->m_hasSkinColors) {
|
|
this->m_backgroundColor = SkinPaletteColor(ResourceMgr::Instance(), this->m_backgroundCell, this->m_resolveSkin);
|
|
this->m_borderColor = SkinPaletteColor(ResourceMgr::Instance(), this->m_borderCell, this->m_resolveSkin);
|
|
}
|
|
|
|
for (UIWindow* child : this->m_children) {
|
|
child->ApplySkin(this->m_resolveSkin);
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x009E6CF0
|
|
// FUNCTION: fn_14471
|
|
void CUIFrameWnd::Paint() {
|
|
if (this->m_hasSkinColors) {
|
|
this->ClearSurface(0xFFFF00FF);
|
|
this->FillRegion(1, 1, this->geometry.width - 2, this->geometry.height - 2, this->m_backgroundColor);
|
|
DrawRoundedBorder(*this, 0, 0, this->geometry.width, this->geometry.height, this->m_borderColor);
|
|
}
|
|
|
|
if (this->m_buttonBarStyle > 0) {
|
|
this->DrawButtonBar(this->m_buttonBarStyle - 1, 0, 1);
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x009E6D60
|
|
// FUNCTION: fn_14472
|
|
void CUIFrameWnd::SetSkinColors(int backgroundColumn, int backgroundRow, int borderColumn, int borderRow) {
|
|
this->m_backgroundCell.column = backgroundColumn;
|
|
this->m_backgroundCell.row = backgroundRow;
|
|
this->m_borderCell.column = borderColumn;
|
|
this->m_borderCell.row = borderRow;
|
|
this->m_hasSkinColors = true;
|
|
|
|
this->m_backgroundColor = SkinPaletteColor(ResourceMgr::Instance(), this->m_backgroundCell, this->m_resolveSkin);
|
|
this->m_borderColor = SkinPaletteColor(ResourceMgr::Instance(), this->m_borderCell, this->m_resolveSkin);
|
|
}
|