Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
inchar with more than one character and inchar_active #379242
07/30/11 20:52
07/30/11 20:52
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline OP

Programmer
Lukas  Offline OP

Programmer

Joined: May 2007
Posts: 2,043
Germany
Currently, if you e.g. want to type in "^^" with inchar, it only returns "^" as it always only returns one character. It would be nice if inchar could return both characters.

Also, it seems that inkey_active doesn't affect inchar. So it would be nice if there was an inchar_active. In the current LBGUI demo, if you go to the editbox demo and click the LBGUI editbox first, and then click somewhere else with the mouse, you can't activate the inkey editbox without pressing any key that inchar accepts as a character. This would be fixed with an inchar_active OR making inkey react to inkey_active = 0.

Re: inchar with more than one character and inchar_active [Re: Lukas] #379531
08/04/11 00:08
08/04/11 00:08
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline OP

Programmer
Lukas  Offline OP

Programmer

Joined: May 2007
Posts: 2,043
Germany
Bump. I'm not asking for anything undoable, am I? wink

Re: inchar with more than one character and inchar_active [Re: Lukas] #379638
08/05/11 11:31
08/05/11 11:31
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
inchar can not return two characters, but we'll find a solution.

Re: inchar with more than one character and inchar_active [Re: jcl] #379641
08/05/11 12:52
08/05/11 12:52
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline OP

Programmer
Lukas  Offline OP

Programmer

Joined: May 2007
Posts: 2,043
Germany
Ok, thanks. laugh
But what about the inchar_active?

Re: inchar with more than one character and inchar_active [Re: Lukas] #384804
10/08/11 17:24
10/08/11 17:24
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline OP

Programmer
Lukas  Offline OP

Programmer

Joined: May 2007
Posts: 2,043
Germany
Hi,
is there going to be a solution for the double characters soon?

Re: inchar with more than one character and inchar_active [Re: Lukas] #384899
10/10/11 07:48
10/10/11 07:48
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
The solution is using inkey, not inchar, and checking the number of entered characters.

Re: inchar with more than one character and inchar_active [Re: jcl] #384936
10/10/11 13:36
10/10/11 13:36
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline OP

Programmer
Lukas  Offline OP

Programmer

Joined: May 2007
Posts: 2,043
Germany
Well, that's IMO a rather ugly solution and would require big changes in my code.
Also, that's something I also could have done before. And this would kinda defy the purpose of the inchar key, which I thought was to make an own input method.

How about this: You create a global string that will be filled with the multiple characters inchar can't return. Would that be possible?

Re: inchar with more than one character and inchar_active [Re: Lukas] #384954
10/10/11 18:09
10/10/11 18:09
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Doesn't inchar already imply that it only returns one character? Why should that be changed when there is inkey for the purpose of capturing longer input?


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: inchar with more than one character and inchar_active [Re: WretchedSid] #385060
10/12/11 10:16
10/12/11 10:16
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Yes, inkey is obviously the function with the global string that you want.

Re: inchar with more than one character and inchar_active [Re: jcl] #385081
10/12/11 13:54
10/12/11 13:54
Joined: May 2007
Posts: 2,043
Germany
Lukas Offline OP

Programmer
Lukas  Offline OP

Programmer

Joined: May 2007
Posts: 2,043
Germany
Ok, I guess I'll have to use inkey then, if I want to be able to type in "^^"...

Btw, jcl, now that I used the Watched Topic feature and get an email with your original post, I realize how often you edit your posts. You originally said:
Originally Posted By: jcl
Yes, that's also what I don't understand. Using inkey is the obvious solution and should be done in 5 minutes with minimal effort.


Other than inchar, inkey doesn't return after each character, but pauses the function till it's finished. So it requires an other function that always keeps running. Also, I won't be able to handle backspaces etc. so easily, especially if I want to be able to block them. So I kinda disagree on the 5 minutes...

Page 1 of 2 1 2

Moderated by  aztec, Spirit 

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