mirror of
https://github.com/edubart/otclient.git
synced 2025-11-07 13:56:22 +01:00
text edit (not finished)
This commit is contained in:
@@ -35,12 +35,24 @@ class UITextEdit : public UIElement
|
||||
public:
|
||||
UITextEdit(Font *font = NULL);
|
||||
|
||||
void onInputEvent(const InputEvent& event);
|
||||
|
||||
void render();
|
||||
|
||||
void clearText();
|
||||
void setText(const std::string& text);
|
||||
const std::string& getText() const { return m_text; }
|
||||
|
||||
void setCursorPos(uint pos);
|
||||
uint getCursorPos() { return m_cursorPos; }
|
||||
|
||||
private:
|
||||
void appendCharacter(char c);
|
||||
void removeCharacter(bool right);
|
||||
void recalculate();
|
||||
|
||||
uint m_cursorPos;
|
||||
int m_startRenderPos;
|
||||
std::string m_text;
|
||||
Font *m_font;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user