mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
fix textbox scrolling
This commit is contained in:
parent
1d4abd7758
commit
bebb5049ef
3 changed files with 28 additions and 15 deletions
|
|
@ -9,6 +9,7 @@
|
|||
namespace gui {
|
||||
class Container : public UINode, public ::util::ObjectsKeeper {
|
||||
int prevScrollY = -1;
|
||||
bool scrollbarTriggered = false;
|
||||
protected:
|
||||
std::vector<std::shared_ptr<UINode>> nodes;
|
||||
std::vector<IntervalEvent> intervalEvents;
|
||||
|
|
@ -18,13 +19,14 @@ namespace gui {
|
|||
int actualLength = 0;
|
||||
bool scrollable = true;
|
||||
|
||||
bool isScrolling() {
|
||||
return prevScrollY != -1;
|
||||
bool isScrolling() const {
|
||||
return scrollbarTriggered;
|
||||
}
|
||||
public:
|
||||
Container(GUI& gui, glm::vec2 size);
|
||||
virtual ~Container();
|
||||
|
||||
virtual void click(int, int) override;
|
||||
virtual void act(float delta) override;
|
||||
virtual void drawBackground(const DrawContext& pctx, const Assets& assets);
|
||||
virtual void draw(const DrawContext& pctx, const Assets& assets) override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue