Decompile fn_12930 (UITransMenuWnd::OnMouseMove)
Batch #15988 by Yommy: 1 byte-identical, 0 confirmed by peer review. - fn_12930 UITransMenuWnd::OnMouseMove: byte-identical Merged automatically: every function is byte-identical to the original.
This commit is contained in:
parent
81896e2339
commit
fa18a528ca
1 changed files with 6 additions and 7 deletions
|
|
@ -43,13 +43,12 @@ void UITransMenuWnd::OnLBtnDown(int x, int y) {
|
|||
void UITransMenuWnd::OnMouseMove(int x, int y) {
|
||||
const int margin = this->m_margin;
|
||||
const int previous = this->m_selected;
|
||||
int selected = -1;
|
||||
if (margin <= y) {
|
||||
const unsigned count = this->m_items.size();
|
||||
if ((this->m_lineHeight + margin / 2) * count + margin >= static_cast<unsigned>(y)) {
|
||||
const int cellHeight = (this->geometry.height - 2 * margin) / count;
|
||||
selected = (y - margin) / cellHeight;
|
||||
}
|
||||
int selected;
|
||||
if (margin <= y && (this->m_lineHeight + margin / 2) * this->m_items.size() + margin >= static_cast<unsigned>(y)) {
|
||||
const int cellHeight = (this->geometry.height - 2 * margin) / this->m_items.size();
|
||||
selected = (y - margin) / cellHeight;
|
||||
} else {
|
||||
selected = -1;
|
||||
}
|
||||
|
||||
this->m_selected = selected;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue