From 64edf98da417e1616a259c3dcff59072201d0473 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 3 Nov 2023 22:31:01 +0100 Subject: [PATCH] test_menu: add simple colored Boxes --- src/gui/test_menu.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/gui/test_menu.cpp b/src/gui/test_menu.cpp index c595dbc15..74f3b4fb1 100644 --- a/src/gui/test_menu.cpp +++ b/src/gui/test_menu.cpp @@ -1272,6 +1272,20 @@ int CTestMenu::exec(CMenuTarget *parent, const std::string &actionKey) y += dy; } } + else if (actionKey == "simple_box") + { + int x = 50; + int y = 20; + int dx = 1000; + int dy = CFrameBuffer::getInstance()->getScreenHeight(false)/20; + for(int col = COL_WHITE0; col <= COL_LIGHT_GRAY0; col++) + { + fb_pixel_t col_real = CFrameBuffer::getInstance()->realcolor[col]; + CFrameBuffer::getInstance()->paintBoxRel(x, y, dx, dy, col_real, 9, CORNER_ALL); + + y += dy; + } + } else if (actionKey == "record_count") { CRecInfo rv(20, 20, 120, 0); @@ -1426,6 +1440,9 @@ int CTestMenu::showTestMenu() // colors w_test.addItem(new CMenuForwarder("Color palette", true, NULL, this, "colors")); + // simple boxes + w_test.addItem(new CMenuForwarder("Simple boxes", true, NULL, this, "simple_box")); + // restart gui w_test.addItem(new CMenuForwarder(LOCALE_SERVICEMENU_RESTART, true, NULL, CNeutrinoApp::getInstance(), "restart", CRCInput::RC_standby));