mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
textbox text scroll
This commit is contained in:
parent
f28acdbecc
commit
d94d8be7cb
2 changed files with 18 additions and 5 deletions
|
|
@ -112,10 +112,13 @@ namespace gui {
|
|||
bool valid = true;
|
||||
/// @brief text input pointer, value may be greather than text length
|
||||
uint caret = 0;
|
||||
uint textOffset = 0;
|
||||
int textInitX;
|
||||
double caretLastMove = 0.0;
|
||||
Font* font = nullptr;
|
||||
|
||||
void paste(const std::wstring& text);
|
||||
void setTextOffset(uint x);
|
||||
public:
|
||||
TextBox(std::wstring placeholder,
|
||||
glm::vec4 padding=glm::vec4(4.0f));
|
||||
|
|
@ -148,7 +151,6 @@ 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;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue