Cancel Text Input?

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
BlackNinjaGames
Posts: 31
Joined: Mon Sep 05, 2005 4:47 pm
Contact:

Cancel Text Input?

Post by BlackNinjaGames »

In my game, when the player presses 'Y', I create an edit box, in which the type there message.

However, the Y is picked up by the edit box, so each message automatically starts with a 'Y' at the beginning. Is there a way to cancel this 'Y' press?
The Great

Post by The Great »

Try this:

Code: Select all

if ((event.EventType == EET_KEY_INPUT_EVENT &&
		event.KeyInput.Key == KEY_KEY_Y &&
		event.KeyInput.PressedDown == false)
BlackNinjaGames
Posts: 31
Joined: Mon Sep 05, 2005 4:47 pm
Contact:

Post by BlackNinjaGames »

Ah, yes.

Well then :oops:

I'm using IrrlichtNX, so it took some converting, but thank you!
Post Reply