Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

native.newTextField() and OpenGL
Started by theblueman82 Apr 29 2019 03:03 PM

3 replies to this topic
opengl newtextfield
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

theblueman82

[GLOBAL: userInfoPane.html]
theblueman82
  • Observer

  • 6 posts
  • Corona SDK

Dear Corona dev team and community,

I'm fully aware of the limitation I'm about to discuss, but I really need a way around this.

 

I'm working on a non-game app that has few user text inputs over few stages. Each stage is displayed as a single group on the screen. When the user is done with the current display, tapping on "next" slides the current display to the left and brings in the next one from the right.

 

To add a nice visual effect and enhance user experience, the current display slides slower to the left than the new display that slides from the right onto the screen.

Because newTextField elements are always on top, they're breaking this visual sliding effect.

Dropping this sliding effect completely will make things "work fine", but degrades user experience which I really don't prefer.

 

My question: is there a way to overcome this somehow?! A sneak turn around? I'm certain that someone else faced this before.

If not, is it possible to somehow implement a plugin or a workaround?

 

Thank you very much.

 

Cheers

Alex



[TOPIC: post.html]
#2

roaminggamer

[GLOBAL: userInfoPane.html]
roaminggamer
  • Corona Geek

  • 7,591 posts
  • Corona SDK

Perhaps.

 

Typically, when I want a text field to behave nicely with display objects, I substitute a fake.

 

For example, the 'text fields' in the EAT editor (a dead project of mine) looked like this (see column on right)

4.jpg

 

Those are actually display object that look like native Windows text fields.  Clicking them hid the display object (and text object) and showed the real text field for that position.

 

Changes made in the text field were then reflected in the fake textfield-object's child text object.  Deselecting the text field would cause it to hide and re-show the fake one.

 

This allowed me to create scrollers with 'emedded' text objects.

 

I did this by writing a builder function that did all the work.  Then, creating a text=field + fake was just a function call away.


Edited by roaminggamer, 29 April 2019 - 07:14 PM.


[TOPIC: post.html]
#3

theblueman82

[GLOBAL: userInfoPane.html]
theblueman82
  • Observer

  • 6 posts
  • Corona SDK

Thanks for the reply, that's helpful but sounds trickier than I thought.

I was hoping for a more fundamental approach, like a plugin or even a modification at a base level. You seem to be quite the expert in Corona, do you think that's possible? Or I have to live with it (at least for now) and adapt my project to what we have in hand?

 

Since we're at this, let me ask the following before investing too much time and effort in Corona: there are few user-input stages, ratings, like radio button input, star rating, check box input.

I have some ideas on how to do the star rating one, but not sure about the rest. Do you think I can achieve these with Corona? Or I need to consider other options?...

 

Thanks a bunch!

Alex



[TOPIC: post.html]
#4

theblueman82

[GLOBAL: userInfoPane.html]
theblueman82
  • Observer

  • 6 posts
  • Corona SDK

I found a radio button and checkbox sample in the widget demo, very helpful.




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: opengl, newtextfield