mouse caret movement

This commit is contained in:
MihailRis
2024-02-22 13:32:27 +03:00
parent c674bd4ec5
commit 90057e1f30
4 changed files with 31 additions and 11 deletions
+4
View File
@@ -15,6 +15,7 @@
class Batch2D;
class Assets;
class Font;
namespace gui {
class Label : public UINode {
@@ -111,6 +112,7 @@ namespace gui {
/// @brief text input pointer, value may be greather than text length
uint caret = 0;
double caretLastMove = 0.0;
Font* font = nullptr;
void paste(const std::wstring& text);
public:
@@ -145,6 +147,8 @@ namespace gui {
virtual void setOnEditStart(runnable oneditstart);
virtual void focus(GUI*) override;
virtual void refresh() override;
virtual void clicked(GUI*, int button) override;
virtual void mouseMove(GUI*, int x, int y) override;
};
class InputBindBox : public Panel {