Batch #4429 by eAthena: 0 byte-identical, 9 confirmed by peer review. - fn_10915 UIEditCtrlVarId::SendMsg: logic confirmed by peer review - fn_10916 UIEditCtrl_OldList::SendMsg: logic confirmed by peer review - fn_10917 UIEmblemWnd::SendMsg: logic confirmed by peer review - fn_10919 UIRadioBtn::SendMsg: logic confirmed by peer review - fn_10920 UISlotBitmap::SendMsg: logic confirmed by peer review - fn_10921 UITab::SendMsg: logic confirmed by peer review - fn_10923 UIWordDisplayWnd::SendMsg: logic confirmed by peer review - fn_10935 UIBalloonText::SetFontHeight: logic confirmed by peer review - fn_10936 UIStaticText::SetFont: logic confirmed by peer review Peer-reviewed-by: alisonrag, willerthal Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
61 lines
1.8 KiB
C++
61 lines
1.8 KiB
C++
#include "Resource/Bitmap/BitmapResource.h"
|
|
#include "Resource/ResourceMgr.h"
|
|
#include "Resource/TextureNames.h"
|
|
#include "UI/Window/UITab.h"
|
|
|
|
#include <cstdio>
|
|
|
|
// OFFSET: 0x0085DFC0
|
|
// FUNCTION: fn_10821
|
|
void UITab::Paint() {
|
|
char name[128];
|
|
|
|
if (this->style == 0) {
|
|
std::sprintf(name, "유저인터페이스\\basic_interface\\tab_itm_%02d.bmp", this->geometry.unknown_0030 + 1);
|
|
} else if (this->style == 1) {
|
|
std::sprintf(name, "유저인터페이스\\basic_interface\\tab_cmd_%02d.bmp", this->geometry.unknown_0030 + 1);
|
|
} else if (this->style == 2) {
|
|
std::sprintf(name, "유저인터페이스\\basic_interface\\tab_que_%02d.bmp", this->geometry.unknown_0030 + 1);
|
|
} else if (this->style == 3) {
|
|
std::sprintf(name, "유저인터페이스\\basic_interface\\tab_item_%02d.bmp", this->geometry.unknown_0030 + 1);
|
|
} else {
|
|
return;
|
|
}
|
|
|
|
CBitmapRes* bitmap = static_cast<CBitmapRes*>(ResourceMgr::Instance().Load(Resolve(name)));
|
|
this->DrawBitmap(0, 0, bitmap ? &bitmap->image : nullptr, false);
|
|
}
|
|
|
|
// OFFSET: 0x0085EE70
|
|
// FUNCTION: fn_10851
|
|
void UITab::Slot25(int, int y) {
|
|
if (!this->parent) {
|
|
return;
|
|
}
|
|
|
|
int index = y / (this->geometry.height / this->tabCount);
|
|
if (index < 0) {
|
|
index = 0;
|
|
}
|
|
|
|
if (index > this->tabCount - 1) {
|
|
index = this->tabCount - 1;
|
|
}
|
|
|
|
if (this->geometry.unknown_0030 != static_cast<std::uint32_t>(index)) {
|
|
this->geometry.unknown_0030 = index;
|
|
this->Invalidate();
|
|
this->parent->SendMsg(this, 22, this->geometry.unknown_0030, 0, 0, 0);
|
|
}
|
|
}
|
|
|
|
// OFFSET: 0x00865200
|
|
// FUNCTION: fn_10921
|
|
int UITab::SendMsg(UIWindow* sender, int message, std::intptr_t argument1, std::intptr_t argument2, std::intptr_t argument3, std::intptr_t argument4) {
|
|
if (message == 13) {
|
|
this->geometry.unknown_0030 = argument1;
|
|
this->Invalidate();
|
|
}
|
|
|
|
return 0;
|
|
}
|