Game Development Community

How to remove F11 & F10 key ?

by Phuong · in General Discussion · 09/20/2006 (2:25 pm) · 6 replies

I use demo Torque engine (example folder), and I don't want to end-user can press F10 and F11 key. How to disabled or remove F11 & F10 key?

About the author


#1
09/20/2006 (3:40 pm)
I am learning using TGE 1.3. Based on that, do a search for F10 and F11 in your files. You can then comment out the script. If I remember, the scripts are located in the common folder and are .gui scripts.
#2
09/20/2006 (11:02 pm)
Can you tell me the name of .gui file which store F11 and F10 key?
#3
09/21/2006 (4:24 am)
Somebody help me! Plz T_T
#4
09/21/2006 (5:40 am)
Hey Phuong,

I did a simple search with TextPad and based on my version of TGE 1.3 you can find it in the following files:

Searching for: f10
common\ui\GuiEditorGui.gui(390): GuiEditorMenuBar.addMenuItem("File", "Toggle GUI Editor...", 4, "F10");
common\ui\GuiEditorGui.gui(572): GlobalActionMap.bind(keyboard, "f10", GuiEdit);
Found 2 occurrence(s) in 1 file(s)

So in the case of "F10" above, it tells us it can be found in the common folder, in the ui folder, then the actual file GuiEditorGui.gui. In this case the string "F10" is located on line number 390.

Searching for: F11
C:\Torque\SDK\example\common\editor\editor.cs(112): GlobalActionMap.bind(keyboard, "f11", toggleEditor);
Found 1 occurrence(s) in 1 file(s)

Find those lines and simply comment them out with two "//"

The above is a very well known technique in modding (or so I've learned) and can help you with figuring out how other parts of the game is set up.
#5
09/21/2006 (10:37 am)
My Game Folder was developed from tutorial.base (tutorial.base's default Torque folder example). And in that folder, I don't see and script file like GuiEditorGui.gui or editor.cs. I try to use TextPad to search "F11" or "F10" keyword but can't find anything in my folder. When that, How to disable F10 and F11 key? T^T
#6
09/21/2006 (11:23 am)
Your maybe using tutorial.base but look at the paths that James Tadeo is give you. They are in the common folder. Even though you are basing your game off the tutorial.base it still needs the common folder to work.

C:\Torque\SDK\example\common
C:\Torque\SDK\example\tutorial.base

Now if you using TGE 1.4.0 tutorial.base

C:\Torque\SDK\example\creator\editor\EditorGui.cs
F11 is around line 135