mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-13 12:12:16 -04:00
Remove a lot of static_cast<>s involving UI structs.
Also starting to get religion on using unsigned integers only when I want their wrapping/modulus behavior.
This commit is contained in:
parent
4c8550bb7d
commit
3f94591083
11 changed files with 28 additions and 76 deletions
|
@ -82,13 +82,10 @@ void MenuView::add_items(std::initializer_list<MenuItem> items) {
|
|||
void MenuView::set_parent_rect(const Rect new_parent_rect) {
|
||||
View::set_parent_rect(new_parent_rect);
|
||||
|
||||
constexpr size_t item_height = 24;
|
||||
size_t i = 0;
|
||||
constexpr int item_height = 24;
|
||||
int i = 0;
|
||||
for(auto child : children_) {
|
||||
child->set_parent_rect({
|
||||
{ 0, static_cast<ui::Coord>(i * item_height) },
|
||||
{ size().width(), item_height }
|
||||
});
|
||||
child->set_parent_rect({ 0, i * item_height, size().width(), item_height });
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue