Decompile fn_14637 (CUIControl::IsPointInside)
Batch #1168 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_14637 CUIControl::IsPointInside: logic confirmed by peer review Reviewed-by: ragnarok-clanker
This commit is contained in:
parent
610551894c
commit
32f5266595
2 changed files with 12 additions and 0 deletions
|
|
@ -1,5 +1,7 @@
|
|||
#include "UI/Window/UIControl.h"
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
// INLINED
|
||||
CUIControl::CUIControl(UIWindowContext& context) : UIWindow(context, 0), hitEnabled(1) {
|
||||
}
|
||||
|
|
@ -101,6 +103,14 @@ void CUIControl::Slot35(int value) {
|
|||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x009EF5F0
|
||||
// FUNCTION: fn_14637
|
||||
bool CUIControl::IsPointInside(int x, int y) {
|
||||
RECT rect = {this->geometry.x, this->geometry.y, this->geometry.x + this->geometry.width, this->geometry.y + this->geometry.height};
|
||||
POINT point = {x, y};
|
||||
return PtInRect(&rect, point) != FALSE;
|
||||
}
|
||||
|
||||
// OFFSET: 0x009EF5E0
|
||||
// FUNCTION: fn_14636
|
||||
void CUIControl::Invalidate() {
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ public:
|
|||
void Slot52(int value) override;
|
||||
virtual void Slot53(int value);
|
||||
|
||||
bool IsPointInside(int x, int y);
|
||||
|
||||
/* 007C */ unsigned char hitEnabled;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue