You have two main options, I think. First one is to create your own text field component, listening to keyboard events (or polling them), handling focus on your component and displaying the text. That shouldn't be too bad actually, just annoying.
The other option would be to use an external UI library and plug its render callbacks to orx (something like CeGUI or ImGUI (taken from RecastNavigation)).
Not sure which one would best suits your need though, so it's up to you!
mmm ... I think I prefer the first option. I don't like CEGUI: P
Well, the answers to these questions will help me a lot:
1) How I can get the keys pressed without using the config.ini?
2) How I can draw basic shapes with orx? as squares, lines, etc..
Another question!
And if I want my application is compatible with android? What considerations must I have? how I can use the user interface of android? (for elements like textbox, and others?)
mmm ... I think I prefer the first option. I don't like CEGUI: P
Someone mentioned on the forum, not so long ago, another open source library that looked really interesting but I can't seem to find it today. -_-
Well, the answers to these questions will help me a lot:
1) How I can get the keys pressed without using the config.ini?
Look at the orxKeyboard module.
2) How I can draw basic shapes with orx? as squares, lines, etc..
I've added primitive drawing only a couple of weeks ago. Look at orxDisplay_Draw*(). They're slower than rendering objects though, as they can't benefit from batching.
If you only want to draw boxes or lines, another alternative is to have objects whose graphic is using the "pixel" texture (it's an actual internal texture in orx) and scale them to your liking.
Another question!
And if I want my application is compatible with android? What considerations must I have? how I can use the user interface of android? (for elements like textbox, and others?)
If you're happy with your own text field made in orx, no need to do any change I believe.
If you want the actual Android controls/widgets, you'll have to use the Android API and add #ifdef __orxANDROID__ around.
Faistoiplaisir or Lydesik could provide more info on that as they're the masters of the Android version.
Ahah yes, one of the solution is to handle the repetition yourself as you found out.
But you have at least another option which is to go through the input system. This has the advantage of handling the repetition for you, you can act upon key press and/or key release, and you can even trigger the inputs yourself to simulate someone typing (useful for tutorials, for example).
Ahah yes, one of the solution is to handle the repetition yourself as you found out.
But you have at least another option which is to go through the input system. This has the advantage of handling the repetition for you, you can act upon key press and/or key release, and you can even trigger the inputs yourself to simulate someone typing (useful for tutorials, for example).
Comments
That's probably of the most tricky thing to do with orx. Or at least annoying.
I believe tdomhan wanted to write a tutorial on that, but apparently it's the only of his tutorial he never found the time to write. ^^
You have two main options, I think. First one is to create your own text field component, listening to keyboard events (or polling them), handling focus on your component and displaying the text. That shouldn't be too bad actually, just annoying.
The other option would be to use an external UI library and plug its render callbacks to orx (something like CeGUI or ImGUI (taken from RecastNavigation)).
Not sure which one would best suits your need though, so it's up to you!
Well, the answers to these questions will help me a lot:
1) How I can get the keys pressed without using the config.ini?
2) How I can draw basic shapes with orx? as squares, lines, etc..
Another question!
And if I want my application is compatible with android? What considerations must I have? how I can use the user interface of android? (for elements like textbox, and others?)
Someone mentioned on the forum, not so long ago, another open source library that looked really interesting but I can't seem to find it today. -_-
Look at the orxKeyboard module.
I've added primitive drawing only a couple of weeks ago. Look at orxDisplay_Draw*(). They're slower than rendering objects though, as they can't benefit from batching.
If you only want to draw boxes or lines, another alternative is to have objects whose graphic is using the "pixel" texture (it's an actual internal texture in orx) and scale them to your liking.
If you're happy with your own text field made in orx, no need to do any change I believe.
If you want the actual Android controls/widgets, you'll have to use the Android API and add #ifdef __orxANDROID__ around.
Faistoiplaisir or Lydesik could provide more info on that as they're the masters of the Android version.
My problem is in textbox:
I write with the keyboard 'hola' and the textbox's text is 'hhhhoooollllaaaa' :P
Solution founded: add a timer
But you have at least another option which is to go through the input system. This has the advantage of handling the repetition for you, you can act upon key press and/or key release, and you can even trigger the inputs yourself to simulate someone typing (useful for tutorials, for example).
PS: Nice buttons there, by the way!
Yes, it's true
Thank you!
By the way, I think you meant to use the "quote" tag in your post, not the "code" one!