Fixed bug in EditTextWidget whereby cursor wasn't being placed when

clicking the mouse.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@811 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2005-10-04 22:46:52 +00:00
parent 655bf38f4f
commit 225acee6ba
1 changed files with 5 additions and 1 deletions

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: EditTextWidget.cxx,v 1.11 2005-09-30 00:53:30 stephena Exp $
// $Id: EditTextWidget.cxx,v 1.12 2005-10-04 22:46:52 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -33,6 +33,8 @@ EditTextWidget::EditTextWidget(GuiObject* boss, int x, int y, int w, int h,
_flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS;
_type = kEditTextWidget;
_editable = true;
setEditString(text);
}
@ -62,7 +64,9 @@ void EditTextWidget::handleMouseDown(int x, int y, int button, int clickCount)
}
if (setCaretPos(i))
{
setDirty(); draw();
}
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -