mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-04 20:54:28 -04:00
Prepare for display orientation part 1 (#2661)
This commit is contained in:
parent
6f6d863a14
commit
a1d7cf2b86
85 changed files with 405 additions and 334 deletions
|
@ -501,7 +501,7 @@ void SystemStatusView::on_camera() {
|
|||
return;
|
||||
|
||||
for (int i = 0; i < screen_height; i++) {
|
||||
std::array<ColorRGB888, screen_width> row;
|
||||
std::vector<ColorRGB888> row(ui::screen_width);
|
||||
portapack::display.read_pixels({0, i, screen_width, 1}, row);
|
||||
png.write_scanline(row);
|
||||
}
|
||||
|
@ -949,8 +949,8 @@ SystemView::SystemView(
|
|||
|
||||
add_child(&info_view);
|
||||
info_view.set_parent_rect(
|
||||
{{0, 19 * 16},
|
||||
{parent_rect.width(), info_view_height}});
|
||||
{{0, screen_height - 16},
|
||||
{screen_width, info_view_height}});
|
||||
|
||||
navigation_view.on_view_changed = [this](const View& new_view) {
|
||||
if (!this->navigation_view.is_top()) {
|
||||
|
@ -1055,7 +1055,7 @@ SplashScreenView::SplashScreenView(NavigationView& nav)
|
|||
void SplashScreenView::paint(Painter&) {
|
||||
if (!portapack::display.draw_bmp_from_sdcard_file({0, 0}, splash_dot_bmp))
|
||||
// ^ try draw bmp file from sdcard at (0,0), and the (0,0) already bypassed the status bar, so actual pos is (0, STATUS_BAR_HEIGHT)
|
||||
portapack::display.draw_bitmap({screen_width / 2 - 120,
|
||||
portapack::display.draw_bitmap({0,
|
||||
screen_height / 2},
|
||||
bitmap_titlebar_image.size,
|
||||
bitmap_titlebar_image.data,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue