text-input width

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1919 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2008-05-10 20:28:49 +00:00
parent e2ebfe75d8
commit 50abbbe3ce
3 changed files with 17 additions and 9 deletions
+1 -1
View File
@@ -162,7 +162,7 @@ struct mitemtextinput : mitemtext
virtual void render(int x, int y, int w)
{
bool selection = isselection();
int tw = max(text_width(text), VIRTW/4);
int tw = VIRTW/4;
if(selection) renderbg(x+w-tw, y-FONTH/6, tw, NULL);
draw_text(text, x, y);
int offset = text_width(input.buf, input.pos>=0 ? input.pos : -1);