Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, juanex, Grant), 1,018 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: What does inkey() return? [Re: jcl] #409127
10/11/12 22:12
10/11/12 22:12
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline OP
Expert
Uhrwerk  Offline OP
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Thank you very much for the tip with redefining the struct. That comes in very handy. Maybe you could overload str_cursor with a function that takes an additional var argument and sets the cursor to that position in a future version?

Originally Posted By: jcl
Yes, inkey and inchar switches off all other key functions - that is mentioned in the manual. Only after inkey/inchar ended you can again use the normal key events and variables.

I was aware of this. My point was that the state of the keys is even unavailable one frame after inkey has terminated. Maybe that is a good addendum for the manual.


Always learn from history, to be sure you make the same mistakes again...
Re: What does inkey() return? [Re: Uhrwerk] #409128
10/11/12 22:34
10/11/12 22:34
Joined: Sep 2007
Posts: 101
Luxembourg
K
krial057 Offline
Member
krial057  Offline
Member
K

Joined: Sep 2007
Posts: 101
Luxembourg
Quote:
Maybe you could overload str_cursor with a function that takes an additional var argument and sets the cursor to that position in a future version?

You could do that by yourself for now:

Php Code:
void str_cursor(STRING* str, long newpos)
{
	char* pCursorPos = (char*)&newpos;
	str->pad[4] = pCursorPos[0];
	str->pad[5] = pCursorPos[1];
	str->pad[6] = pCursorPos[2];
	str->pad[7] = pCursorPos[3];
} 



Last edited by krial057; 10/11/12 22:34.
Re: What does inkey() return? [Re: krial057] #409130
10/11/12 22:56
10/11/12 22:56
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline OP
Expert
Uhrwerk  Offline OP
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
I have already done this, just a bit different: I copied JCL's redefinition and directly set and return the cursor member of the STRING struct in my str_cursor version. Your workaround looks nice as well. Maybe I'll switch.

I was just asking for an officially supported version as manually overriding an engine struct seems a bit dirty to me and I guess the implementation work for JCL would only be marginal.


Always learn from history, to be sure you make the same mistakes again...
Page 2 of 2 1 2

Moderated by  old_bill, Tobias 

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