Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Quad, 1 invisible), 877 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Modifying Inkey #254407
03/03/09 06:46
03/03/09 06:46
Joined: Feb 2009
Posts: 33
Germany, Hamburg
V
Vorick Offline OP
Newbie
Vorick  Offline OP
Newbie
V

Joined: Feb 2009
Posts: 33
Germany, Hamburg
Good Morning,

I'd like to ask if there is any way to redefine the inkey events, e.g. "Cursor Down" aborts the input and restores the original string. How can I keep the string on "Cursor Down"?

I guess I could just copy the inkey string to a backup string and then restore it manually after cursor down is pressed, but that doesn't seem very feasible.

I also thought about programming my own pseudo-inkey function with on_anykey, but if there's a way to avoid it, I'd be glad to hear about it.

Patrick


A8.10 Commercial
Re: Modifying Inkey [Re: Vorick] #254476
03/03/09 17:42
03/03/09 17:42
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
You could re-activate inkey, when pressing Cursor Down like this:

if(key_cud){while(){wait(1);} inkey_active = 1;}

Didn't test it. If this is sufficient, depends also on your other needs.

Re: Modifying Inkey [Re: Pappenheimer] #254605
03/04/09 11:26
03/04/09 11:26
Joined: Feb 2009
Posts: 33
Germany, Hamburg
V
Vorick Offline OP
Newbie
Vorick  Offline OP
Newbie
V

Joined: Feb 2009
Posts: 33
Germany, Hamburg
Thanks for the hint. I'll look into it.

As of now I think I really need my own version of inkey since I plan to use improved chat features like quest linking and the likes.


A8.10 Commercial
Re: Modifying Inkey [Re: Vorick] #254722
03/05/09 00:19
03/05/09 00:19
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

Look up in_key...you can cancel with a "if"
Quote:

1 Input terminated prematurely because inkey_active was set to 0 or another keyboard entry was active at the same time.
9 Input terminated by [Tab]
13 Input terminated by [Enter]
27 Input aborted by [Esc]
72 Input aborted by [Up]
73 Input aborted by [PgUp]
80 Input aborted by [Down]
81 Input aborted by [PgDn]


Ottawa smile


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1