diff options
Diffstat (limited to 'src/gui/widgets/textfield.h')
-rw-r--r-- | src/gui/widgets/textfield.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/widgets/textfield.h b/src/gui/widgets/textfield.h index c459d34f7..4c1b4bffc 100644 --- a/src/gui/widgets/textfield.h +++ b/src/gui/widgets/textfield.h @@ -139,6 +139,12 @@ class TextField : public gcn::TextField, void caretDeleteWord(); + void setAllowSpecialActions(const bool b) + { mAllowSpecialActions = b; } + + std::string getTextBeforeCaret() const + { return mText.substr(0, mCaretPosition); } + protected: void drawCaret(Graphics* graphics, int x) override final; @@ -166,6 +172,7 @@ class TextField : public gcn::TextField, int mPadding; bool mNumeric; bool mLoseFocusOnTab; + bool mAllowSpecialActions; }; #endif // GUI_WIDGETS_TEXTFIELD_H |