Using Numpad in Gui and Map Editor
by Jeremiah Fulbright · in Torque Game Engine · 04/06/2005 (2:53 pm) · 2 replies
I think I have seen this posted in other areas, but upon searching couldn't find the needed information..
Currently, I use top row of Numbers for keying in values in fields for entities, but was starting to use the Numpad to do some, but I noticed it only works in the GUIEditor (outside of a level). Once I load a mission, the Numpad ceases to be usable inside of the GUIEditor, as well as MapEditor. I looked thru Scripts, but saw nothing that would be numpad only, as the Top-Row of Numbers still works fine.
I tried Numlock off/on and it didn't make a difference.
Any help would be appreciated
Currently, I use top row of Numbers for keying in values in fields for entities, but was starting to use the Numpad to do some, but I noticed it only works in the GUIEditor (outside of a level). Once I load a mission, the Numpad ceases to be usable inside of the GUIEditor, as well as MapEditor. I looked thru Scripts, but saw nothing that would be numpad only, as the Top-Row of Numbers still works fine.
I tried Numlock off/on and it didn't make a difference.
Any help would be appreciated
#2
to this...
in "GuiEditorGui.cs", replace the function "GuiEdit()" with this one...
04/08/2005 (12:28 am)
In "Editor.cs", inside the function "toggleEditor()", change this section of code...if(Canvas.getContent() == EditorGui.getId()) Editor.close(); else Editor.open();
to this...
if(Canvas.getContent() == EditorGui.getId())
{
Editor.close();
// SSP - Gonzo - reactivate direct input
activateDirectInput();
}
else
{
Editor.open();
// SSP - Gonzo - allow NumPad in editor
deactivateDirectInput();
}in "GuiEditorGui.cs", replace the function "GuiEdit()" with this one...
function GuiEdit(%val)
{
if(%val != 0){ return; }
%content = Canvas.getContent();
if(%content == GuiEditorGui.getId())
{
%obj = GuiEditorContent.getObject(0);
if(%obj != -1)
{
GuiGroup.add(%obj);
Canvas.setContent(%obj);
// SSP - Gonzo - reactivate if a mission is active
if(isObject(MissionCleanup)){ activateDirectInput(); }
}
GlobalActionMap.unbind( keyboard, "delete" );
}
else
{
GuiEditorOpen(%content);
// SSP - Gonzo - enable NumPad in editor
deactivateDirectInput();
}
}
Torque Owner Jeff Gran