Disabling ~ for dev console

Grab your favourite IDE and tinker with the innards of game engines

Disabling ~ for dev console

Postby SM Sith Lord on Thu Dec 05, 2013 11:09 am

I need to completely disable the ~ key from opening the developer's console during certain events in my game.

I'm having a little trouble finding where this should be done in the code. Does anybody have some suggestions?
SM Sith Lord
Been Here A While
Been Here A While
 
Joined: Sat Nov 25, 2006 4:25 pm
Location: Los Angles, CA

Re: Disabling ~ for dev console

Postby LordDz on Thu Dec 05, 2013 11:30 pm

I'm a bit unsure why you would like to do that. But what I can think of is to unbind the console key during those moments.
And.. From what I know of, only American keyboards use the ~ for the console.
User avatar
LordDz
May Contain Skills
May Contain Skills
 
Joined: Mon Sep 01, 2008 12:28 pm
Location: Hammer Crash Logs

Re: Disabling ~ for dev console

Postby Gary on Fri Dec 06, 2013 3:28 am

They could probably get around it by exec a config and directly calling the command it's bound to.
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Disabling ~ for dev console

Postby SM Sith Lord on Fri Dec 06, 2013 10:40 am

Ah yes, I could find the bound key to the toggleconsole command, and unbind it, then rebind it after the menu is displayed. Awesome. Hopefully its not bound at a lower level, like the ESC key was.

LordDz, I need to do this to prevent the player from un-pausing the game before he makes a selection from my menu. I disabled ESC key, but the console command can un-pause the game as well.
SM Sith Lord
Been Here A While
Been Here A While
 
Joined: Sat Nov 25, 2006 4:25 pm
Location: Los Angles, CA

Re: Disabling ~ for dev console

Postby LordDz on Fri Dec 06, 2013 11:00 am

But then comes the problem: What if your player has to exit the game right at the moment when he's in your selection menu?
User avatar
LordDz
May Contain Skills
May Contain Skills
 
Joined: Mon Sep 01, 2008 12:28 pm
Location: Hammer Crash Logs

Re: Disabling ~ for dev console

Postby SM Sith Lord on Fri Dec 06, 2013 4:06 pm

There are only 2 options on this menu: quit and resume. lol :P

Elaboration:
When you launch a game from the new version of SMAR•CADE, the entire screen goes grey and the words "PAUSED - Click to resume" appear on the screen, then I turn off the renderer and release all the resources. When the render is off, nothing gets updated, not even the main menu. Even though its not being rendered, the VGUI is still there. I have a big button that takes up 100% of the screen, so when you click anywhere on the screen, it turns the render back on and re-loads all the resources back in. Now it is ready to render and display the main menu again.

So there isn't actually a "Quit" button yet, but I need to think of a way to add one. If I'm closing a game because I want to shut down the whole computer, I would hate having to click RESUME just to get to a QUIT button. Maybe I'll change the words to say "Click to resume, ESC to exit". That should solve the problem of not being able to render anything. :D
SM Sith Lord
Been Here A While
Been Here A While
 
Joined: Sat Nov 25, 2006 4:25 pm
Location: Los Angles, CA

Return to Programming

Who is online

Users browsing this forum: No registered users