|
Two questions about inkey() instruction
#442530
06/24/14 18:49
06/24/14 18:49
|
Joined: May 2014
Posts: 179 The lit part of the Truth
CyberGhost
OP
Member
|
OP
Member
Joined: May 2014
Posts: 179
The lit part of the Truth
|
I read about inkey() function in the manual and two questions came to my mind:
1) Does inkey() instruction "freezes" the function calling it till Enter or Esc ,for example, is pressed ,then scan code is returned? I am just curious about what happens to functions order and stuff ( I already know that game_save/load and on_ functions are not executed)
2) The manual says that Enter or Tab confirms string change while Esc, Up, Down, PageUp and PageDown abort it. What if I want Enter and Esc ONLY for confirmation/abort? How to do it?
Greets!
Nothing to say ....
|
|
|
Re: Two questions about inkey() instruction
[Re: CyberGhost]
#442531
06/24/14 19:18
06/24/14 19:18
|
Joined: Oct 2011
Posts: 1,082 Germany
Ch40zzC0d3r
Serious User
|
Serious User
Joined: Oct 2011
Posts: 1,082
Germany
|
Code your own input function if you need more dynamic things. I believe this function is just for helping starters getting in programming without the need of coding too much theirself. Ah, it should freeze the function its called from, but Im not sure since I dont use it at all 
|
|
|
Re: Two questions about inkey() instruction
[Re: Superku]
#442534
06/24/14 20:01
06/24/14 20:01
|
Joined: May 2014
Posts: 179 The lit part of the Truth
CyberGhost
OP
Member
|
OP
Member
Joined: May 2014
Posts: 179
The lit part of the Truth
|
@Ch40zzC0d3r I think it's a good idea but too difficult for me  . The main issue would be testing all keys ,and I can't use str_for_key(). @Superku You mean if I put it in a while loop it won't respond to keys of confirmation/aborting?
Last edited by CyberGhost; 06/24/14 20:47.
Nothing to say ....
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|