Skip to content

Commit

Permalink
IsActive fix & code cleanup
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MusicMonkey5555 committed Feb 2, 2015
1 parent b11bc8e commit 77b9600
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Engine/source/gui/controls/guiTextEditCtrl.cpp
Expand Up @@ -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 )
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 77b9600

Please sign in to comment.