From 225acee6ba08631ed502f407c4a190866c8e7ff3 Mon Sep 17 00:00:00 2001 From: stephena Date: Tue, 4 Oct 2005 22:46:52 +0000 Subject: [PATCH] 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 --- stella/src/gui/EditTextWidget.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stella/src/gui/EditTextWidget.cxx b/stella/src/gui/EditTextWidget.cxx index 5238df05d..6e18c0e0a 100644 --- a/stella/src/gui/EditTextWidget.cxx +++ b/stella/src/gui/EditTextWidget.cxx @@ -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(); + } } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -