From 56cdfd3822d2800abdd2f912ab7f76a5764793a7 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 19 Oct 2008 13:45:07 +0000 Subject: scrollpane widget, updated chatbox --- src/ui/inputbox.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/ui/inputbox.h') diff --git a/src/ui/inputbox.h b/src/ui/inputbox.h index 557ca6c..961bbcf 100644 --- a/src/ui/inputbox.h +++ b/src/ui/inputbox.h @@ -20,10 +20,19 @@ public: ~InputBox(); /// set the text displayed by the label - void set_text(std::string const &text); + void set_text(const std::string &text); /// set the text displayed by the label void set_text(const char *text); + + /// set the prompt + void set_prompt(const std::string &prompt); + + /// set the prompt + void set_prompt(const char *prompt); + + /// set the maximal input width + void set_max(const size_t max); /// return the text displayed by the label inline std::string const &text() const { @@ -46,7 +55,9 @@ protected: private: std::string input_text; + std::string input_prompt; size_t input_pos; + size_t input_max; }; } -- cgit v1.2.3