diff --git a/Source/UI/Lists/UIListBoxEx.cpp b/Source/UI/Lists/UIListBoxEx.cpp index 1c194a8cc..429598272 100644 --- a/Source/UI/Lists/UIListBoxEx.cpp +++ b/Source/UI/Lists/UIListBoxEx.cpp @@ -120,16 +120,6 @@ void UIListBoxEx::Refresh() { bar->Invalidate(); } -// INLINED -int UIListBoxEx::LineAt(int x, int y) const { - if (x < 0 || y < 0 || x >= this->geometry.width || y >= this->geometry.height) { - return -1; - } - - const int index = (this->topLine + y / this->lineHeight); - return index >= 0 && static_cast(index) < this->lines.size() ? index : -1; -} - // OFFSET: 0x008905A0 // FUNCTION: fn_11419 void UIListBoxEx::Slot25(int x, int y) { diff --git a/Source/UI/Lists/UIListBoxEx.h b/Source/UI/Lists/UIListBoxEx.h index 0ddd7c8e0..2edb888b2 100644 --- a/Source/UI/Lists/UIListBoxEx.h +++ b/Source/UI/Lists/UIListBoxEx.h @@ -51,6 +51,16 @@ protected: int LineAt(int x, int y) const; }; +// INLINED +inline int UIListBoxEx::LineAt(int x, int y) const { + if (x < 0 || y < 0 || x >= this->geometry.width || y >= this->geometry.height) { + return -1; + } + + const int index = (this->topLine + y / this->lineHeight); + return index >= 0 && static_cast(index) < this->lines.size() ? index : -1; +} + #if defined(_WIN32) && !defined(_WIN64) static_assert(sizeof(ExtendedListLine) == 28); static_assert(sizeof(UIListBoxEx) == 0xC0);