rodecomp/Source/UI/Window/UINewSkillListWndHitTest.cpp
ragnarok-clanker e235d90a62 Maintenance: [forced, user-approved] Family G29: WindowMouseHit (inventory row, header of former bundle). The header only declared tw
Batch #10255 by ragnarok-clanker: forced by an admin (0 lower score(s), 0 changed function(s)); checked with 5 compiled unit(s), including every includer of Source/UI/Window/WindowMouseHit.h.
Deletes: Source/UI/Window/WindowMouseHit.h
2026-11-03 12:54:24 +00:00

27 lines
561 B
C++

#include "Client/Session.h"
#include "UI/Window/UINewSkillListWnd.h"
// OFFSET: 0x009B0240
// FUNCTION: fn_13804
int UINewSkillListWnd::SkillIndexAt(int x, int y) {
if (!this->IsSkillArea(x, y)) {
return -1;
}
int column = 0;
int row;
if (g_session.m_simplifiedSkillList != 0) {
row = (y - 34) / 32;
} else {
column = (x - 76) / 68;
row = (y - 44) / 56;
if (x > column * 68 + 100) {
return -1;
}
if (y > row * 56 + 58) {
return -1;
}
}
return (this->m_firstRow + row) * this->m_columns + column;
}