Game Development Community

GuiTextEditCtrl has two password fields

by Tom Spilman · in Torque Game Engine · 02/20/2006 (5:32 am) · 1 replies

Found this working with Torsion and TGE 1.4:

void GuiTextEditCtrl::initPersistFields()
{
   Parent::initPersistFields();

   addField("validate",          TypeString,    Offset(mValidateCommand,   GuiTextEditCtrl));
   addField("escapeCommand",     TypeString,    Offset(mEscapeCommand,     GuiTextEditCtrl));
   addField("historySize",       TypeS32,       Offset(mHistorySize,       GuiTextEditCtrl));
   addField("password",          TypeBool,      Offset(mPasswordText,      GuiTextEditCtrl));     
   addField("tabComplete",       TypeBool,      Offset(mTabComplete,       GuiTextEditCtrl));     
   addField("deniedSound",       TypeAudioProfilePtr, Offset(mDeniedSound, GuiTextEditCtrl));
   addField("sinkAllKeyEvents",  TypeBool,      Offset(mSinkAllKeyEvents,  GuiTextEditCtrl));
   addField("password",          TypeBool,      Offset(mPasswordText,      GuiTextEditCtrl));
   addField("passwordMask",      TypeString,    Offset(mPasswordMask,      GuiTextEditCtrl)); 
}

You can see that there are two identical password fields. It probably doesn't hurt anything, but it's wrong.

About the author

Tom is a programmer and co-owner of Sickhead Games, LLC.


#1
02/23/2006 (3:24 pm)
Actually it might.

I was running through a resource tutorial which hung somewhere. After a lots of looking, I found when I removed a GUI part it worked. So I used the in-game GUI editor. As soon as I clicked the password checkbox I got a freez.

So this might be part of the problem. I removed one, but still getting a freez after recompile.

Running TGE 1.4 on Mac OSX 10.3.9 with Xcode 1.5