mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
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:
parent
b11bc8e93a
commit
77b9600303
1 changed files with 3 additions and 2 deletions
|
|
@ -212,8 +212,7 @@ void GuiTextEditCtrl::execConsoleCallback()
|
||||||
Parent::execConsoleCallback();
|
Parent::execConsoleCallback();
|
||||||
|
|
||||||
// Update the console variable:
|
// Update the console variable:
|
||||||
if ( mConsoleVariable[0] )
|
setVariable(mTextBuffer.getPtr8());
|
||||||
Con::setVariable( mConsoleVariable, mTextBuffer.getPtr8() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GuiTextEditCtrl::updateHistory( StringBuffer *inTxt, bool moveIndex )
|
void GuiTextEditCtrl::updateHistory( StringBuffer *inTxt, bool moveIndex )
|
||||||
|
|
@ -374,6 +373,8 @@ S32 GuiTextEditCtrl::calculateCursorPos( const Point2I &globalPos )
|
||||||
|
|
||||||
void GuiTextEditCtrl::onMouseDown( const GuiEvent &event )
|
void GuiTextEditCtrl::onMouseDown( const GuiEvent &event )
|
||||||
{
|
{
|
||||||
|
if(!isActive())
|
||||||
|
return;
|
||||||
mDragHit = false;
|
mDragHit = false;
|
||||||
|
|
||||||
// If we have a double click, select all text. Otherwise
|
// If we have a double click, select all text. Otherwise
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue