From edc8de3400acbbae60930a9c1d4f946df5b2e68f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 2 Mar 2014 17:09:28 +0300 Subject: In chat add key Ctrl+b for insert bold/normal font size. --- src/gui/widgets/textfield.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/gui/widgets/textfield.h') 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 -- cgit v1.2.3-60-g2f50