mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-25 23:39:37 -05:00
Move AIS recent items list draw function back into class.
This commit is contained in:
parent
fb8e5b21df
commit
eda6e6a5be
@ -299,7 +299,7 @@ bool AISRecentEntriesView::on_key(const ui::KeyEvent event) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ais_list_item_draw(
|
void AISRecentEntriesView::draw(
|
||||||
const AISRecentEntry& entry,
|
const AISRecentEntry& entry,
|
||||||
const Rect& target_rect,
|
const Rect& target_rect,
|
||||||
Painter& painter,
|
Painter& painter,
|
||||||
@ -336,7 +336,7 @@ void AISRecentEntriesView::paint(Painter& painter) {
|
|||||||
for(auto p = range.first; p != range.second; p++) {
|
for(auto p = range.first; p != range.second; p++) {
|
||||||
const auto& entry = *p;
|
const auto& entry = *p;
|
||||||
const auto is_selected_key = (selected_key == entry.key());
|
const auto is_selected_key = (selected_key == entry.key());
|
||||||
ais_list_item_draw(entry, target_rect, painter, s, (has_focus() && is_selected_key));
|
draw(entry, target_rect, painter, s, (has_focus() && is_selected_key));
|
||||||
target_rect.pos.y += target_rect.height();
|
target_rect.pos.y += target_rect.height();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -151,6 +151,14 @@ private:
|
|||||||
const EntryKey invalid_key = 0xffffffff;
|
const EntryKey invalid_key = 0xffffffff;
|
||||||
|
|
||||||
void advance(const int32_t amount);
|
void advance(const int32_t amount);
|
||||||
|
|
||||||
|
void draw(
|
||||||
|
const AISRecentEntry& entry,
|
||||||
|
const Rect& target_rect,
|
||||||
|
Painter& painter,
|
||||||
|
const Style& style,
|
||||||
|
const bool is_selected
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
class AISRecentEntryDetailView : public View {
|
class AISRecentEntryDetailView : public View {
|
||||||
|
Loading…
Reference in New Issue
Block a user