Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / [DarkGDK2] dbEntry printing double of each character

Author
Message
Qqite
14
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Florida, U.S.
Posted: 7th Dec 2012 15:35 Edited at: 7th Dec 2012 15:37

This can't possibly be a user error, can it? I have made the simplest possible example and it still recreated the problem. It prints out every character fine, but double of each.

If this function is broken then I need another way of getting user input of text typing to a string. I've tried google but all I get is std::cin and keystate checking. Is there anything out there that handles backspacing with a buffer automatically?

Ventures of the worlds around us are limited only by our imagination.
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 7th Dec 2012 16:10
It's not broken. I use it in my GUI.


The fastest code is the code never written.
Qqite
14
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Florida, U.S.
Posted: 7th Dec 2012 16:15 Edited at: 7th Dec 2012 16:24
Thats so weird, I keep getting the same problem.
I also can't get the backspace to work.

I just made a quick workaround these errors though:


target being the pointer to the string being used.

I also have those extra checks in there because I'm making a login screen and the user should only be able to type in non-special characters alongside the @ for an email and password.

Ventures of the worlds around us are limited only by our imagination.
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 7th Dec 2012 20:20
Yes. As I recall, I had problems with the backspace also. I intercept keys like backspace and enter before checking the buffer.

The fastest code is the code never written.
Qqite
14
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Florida, U.S.
Posted: 10th Dec 2012 14:59
Ok yea dbEntry has some issues on my end. It almost always puts in double of what I type and even at times triple. I don't know how this could be happening...

I don't have a way of "dbSetEntryBuffer" yet so it can't be any use of that.
This is annoying me because it makes typing in my game very unpredictable...

Anyone have any theories?

Ventures of the worlds around us are limited only by our imagination.
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 10th Dec 2012 18:01

This function is a part of a larger program (GUI2). It illustrates how I use "dbEntry();" to get keyboard input as text.
The guts of it is:

Note the line "Text+=buff[0];"? This is where you would keep unwanted "extra" characters out....

The fastest code is the code never written.
Qqite
14
Years of Service
User Offline
Joined: 28th Feb 2010
Location: Florida, U.S.
Posted: 10th Dec 2012 21:40
So you have the same problem? I posted my solution to the problem above but I was just wondering why it was having this problem in the first place... :\

Ventures of the worlds around us are limited only by our imagination.
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 11th Dec 2012 17:39
No idea..... I think it's internal to GDK.

The fastest code is the code never written.

Login to post a reply

Server time is: 2024-03-28 14:37:37
Your offset time is: 2024-03-28 14:37:37