T3D Patched 1.1 - GuiTextEditCtrl ignores Capslock state
by Justin Knight · in Torque 3D Professional · 05/10/2012 (8:10 am) · 5 replies
(what version are you using?)
Build: Torque 3D Pro 1.1 Patched
(what platform/OS did this happen on?)
Platform: Windows 7 64bit
(where is this bug happening?)
GuiTextEditCtrl
(what is the bug)
GuiTextEditCtrl ignores the state of capslock when entering characters.
(tell us how to trigger the bug)
Steps to Repeat:
1. Create a project based on the 'Full' template
2. Start the game, click 'Join'
3. With capslock off type some lowercase text into the 'Player Name' text control
4. Turn on capslock
5. Type more text into the box, characters are still entered lowercase
(if you know the solution, please post it. not required)
I've hacked a windows only solution by changing gui/guiTextEditCtrl.cpp by:
- Adding #include <windows.h> at top of file
- Adding/updating this code at around line 1150:
(if you have a copy of your console log, please link to it here)
n/a
Build: Torque 3D Pro 1.1 Patched
(what platform/OS did this happen on?)
Platform: Windows 7 64bit
(where is this bug happening?)
GuiTextEditCtrl
(what is the bug)
GuiTextEditCtrl ignores the state of capslock when entering characters.
(tell us how to trigger the bug)
Steps to Repeat:
1. Create a project based on the 'Full' template
2. Start the game, click 'Join'
3. With capslock off type some lowercase text into the 'Player Name' text control
4. Turn on capslock
5. Type more text into the box, characters are still entered lowercase
(if you know the solution, please post it. not required)
I've hacked a windows only solution by changing gui/guiTextEditCtrl.cpp by:
- Adding #include <windows.h> at top of file
- Adding/updating this code at around line 1150:
// Handle capslock
bool caps = GetKeyState(20);
U16 ascii = event.ascii;
if( caps && ascii>=97 && ascii<=122) { // If capslock on and character lowercase
ascii-=32; // Make lower case character upper case
} else if(caps && ascii>=65 && ascii<=90 && (event.modifier & SI_SHIFT)) { // If capslock on, character uppercase, and shift down
ascii+=32; // Make upper case character lower case
}
if( mProfile->mFont->isValidChar( ascii ) )
{
handleCharInput( ascii );
return true;
}I suspect this probably effects other controls but haven't tested this.(if you have a copy of your console log, please link to it here)
n/a
About the author
#2
05/10/2012 (10:16 am)
Patched 1.1
#3
05/10/2012 (10:27 am)
Ah, I'll check 1.2 later to see if it exists there as well, I haven't reinstalled on this machine yet. In the meantime I've changed the thread to reflect the version you're seeing it in currently.
#4
05/10/2012 (10:45 am)
Updated with simpler steps to re-create.
#5
05/10/2012 (4:21 pm)
Confirming this bug exists on Torque 3D Pro 1.1 (not using 1.2 patch) and Torque 3D 1.2.
Associate Scott Burns
GG Alumni