Work on ScrollWidget (Work In Progress/Incomplete)

This commit is contained in:
Philippe Symons
2024-08-01 21:27:49 +02:00
parent 9313571610
commit 65a59d050e
5 changed files with 164 additions and 63 deletions

View File

@@ -12,6 +12,7 @@ class RDPQGraphics;
class IWidget
{
public:
virtual ~IWidget(){}
/**
* @brief Returns whether the widget is currently focused
*/

View File

@@ -33,9 +33,12 @@ public:
uint32_t getDurationInMs() const override;
void start(const Point& startPoint, const Point& endPoint);
void extend(const Point& endPoint);
protected:
void apply(float pos) override;
private:
Point calculatePoint(float pos);
ScrollWidget* list_;
Point windowStartPoint_;
Point windowEndPoint_;
@@ -69,6 +72,7 @@ public:
void addWidget(IWidget* widget);
void removeWidget(IWidget* widget);
void clearWidgets();
bool handleUserInput(const joypad_inputs_t& userInput) override;
void render(RDPQGraphics& gfx, const Rectangle& parentBounds) override;