diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-25 11:58:56 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-25 11:58:56 (GMT) |
| commit | 52ec84198bcab2aa177ced1a9eba3343a097522a (patch) | |
| tree | 05c1aa1305f687cd2622a8bbfa90cc9bd95fa385 /src/interface/Textbox.cpp | |
| parent | 64a404263aec32cc5a0d88c4eeeaea77a8c1a03a (diff) | |
| download | powder-52ec84198bcab2aa177ced1a9eba3343a097522a.zip powder-52ec84198bcab2aa177ced1a9eba3343a097522a.tar.gz | |
Correct size for textbox limits, fixes #8
Diffstat (limited to 'src/interface/Textbox.cpp')
| -rw-r--r-- | src/interface/Textbox.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/interface/Textbox.cpp b/src/interface/Textbox.cpp index 57f9a26..159c326 100644 --- a/src/interface/Textbox.cpp +++ b/src/interface/Textbox.cpp @@ -363,7 +363,9 @@ void Textbox::OnVKeyPress(int key, Uint16 character, bool shift, bool ctrl, bool int regionWidth = Size.X; if(Appearance.icon) - regionWidth -= 17; + regionWidth -= 13; + regionWidth -= Appearance.Margin.Left; + regionWidth -= Appearance.Margin.Right; if((limit==std::string::npos || backingText.length() < limit) && (Graphics::textwidth((char*)std::string(backingText+char(character)).c_str()) <= regionWidth || multiline || limit!=std::string::npos)) { if(cursor == backingText.length()) |
