IsActive fix & code cleanup

Now if a text edit is set to inactive you can't mouse down.
changed code
to use setVariable so code is a bit cleaner.
Fixed some small spacing
issues.
This commit is contained in:
Nathan Bowhay 2015-02-02 13:54:56 -08:00
parent b11bc8e93a
commit 77b9600303

View file

@ -212,8 +212,7 @@ void GuiTextEditCtrl::execConsoleCallback()
Parent::execConsoleCallback();
// Update the console variable:
if ( mConsoleVariable[0] )
Con::setVariable( mConsoleVariable, mTextBuffer.getPtr8() );
setVariable(mTextBuffer.getPtr8());
}
void GuiTextEditCtrl::updateHistory( StringBuffer *inTxt, bool moveIndex )
@ -374,6 +373,8 @@ S32 GuiTextEditCtrl::calculateCursorPos( const Point2I &globalPos )
void GuiTextEditCtrl::onMouseDown( const GuiEvent &event )
{
if(!isActive())
return;
mDragHit = false;
// If we have a double click, select all text. Otherwise