Codechange: Use Rect WithX/WithY in some places.
This commit is contained in:
@@ -253,7 +253,7 @@ struct DropdownWindow : Window {
|
||||
if (y < item_height) {
|
||||
if (item->masked || !item->Selectable()) return false;
|
||||
result = item->result;
|
||||
click_result = item->OnClick({r.left, 0, r.right, item_height - 1}, {_cursor.pos.x - this->left, y});
|
||||
click_result = item->OnClick(r.WithY(0, item_height - 1), {_cursor.pos.x - this->left, y});
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ struct DropdownWindow : Window {
|
||||
if (--pos >= 0) continue;
|
||||
|
||||
if (y + item_height - 1 <= ir.bottom) {
|
||||
Rect full{ir.left, y, ir.right, y + item_height - 1};
|
||||
Rect full = ir.WithY(y, y + item_height - 1);
|
||||
|
||||
bool selected = (this->selected_result == item->result) && item->Selectable();
|
||||
if (selected) GfxFillRect(full, PC_BLACK);
|
||||
|
||||
Reference in New Issue
Block a user