- hourglass: add defaults for x/y position

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2022-11-07 21:21:38 +01:00
committed by Thilo Graf
parent 593003c241
commit e8787da651
2 changed files with 5 additions and 3 deletions

View File

@@ -1236,7 +1236,7 @@ int CTestMenu::exec(CMenuTarget *parent, const std::string &actionKey)
}
else if (actionKey == "hourglass")
{
CHourGlass hg(20, 20);
CHourGlass hg;
hg.paint();
sleep(10);
hg.hide();

View File

@@ -28,6 +28,8 @@
#include <gui/components/cc.h>
#include <gui/components/cc_timer.h>
#include <system/settings.h>
//! CHourglass shows a small image chain with timed order to visualize running processes or breaks.
/*!
CHourglass shows only a timer controlled image chain, CHourglassProc will run an additional process.
@@ -78,8 +80,8 @@ class CHourGlass : public CComponentsShapeSquare
* @see class CComponentsShapeSquare()
*/
CHourGlass( const int x_pos,
const int y_pos,
CHourGlass( const int x_pos = CFrameBuffer::getInstance()->getScreenX() + OFFSET_INNER_MID,
const int y_pos = CFrameBuffer::getInstance()->getScreenY() + OFFSET_INNER_MID,
const int w = 48,
const int h = 48,
const std::string &image_basename = "hourglass",