On Touch Object End but with finger still on the touchscreen

0 favourites
  • 6 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • I try to create a supplement for showing a tooltip per mouseover for touch controls. I have a textbox that is invisible at the start. When the user moves with his finger over the screen and touches a sprite the textbox becomes visible, the position is set to some place over the finger and the text is set to a variable of the sprite. This works. But I want the textbox to become invisible again when the user doesn't touch the sprite anymore. "Is touching object" + "On any touch end" doesn't work here because "on any touch end" doesn't become true. The user is still touching the screen.

    How do I create an event that triggers when the user releases an object but still touches the screen?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You can add an event like this:

    ToolTipText is visible
    Touch is NOT touching object -> ToolTipText set invisible (or destroy)
    
  • I don't understand. You mean an event with two conditions, one that checks if the user is not touching an object and one that checks if the textbox is visible? I can't find a condition "is visible" for textboxes.

  • Strange. What I tried yesterday was a condition "touch is NOT touching object" -> set textbox invisible. It didn't work yesterday. I tried it again and now it works. Don't know what was different yesterday.

    Anyways, problem solved. :)

  • Yes, an event with two condition. The first condition doesn't really matter, it was just an example. You can use some other way to check if the tip text is on the screen, or even remove this condition completely.

    By the way, are you saying are you using Text Box object just to display text? Why not use Text object?

  • Because I need a background behind the text to make it readable. I thought a text box would be a quick and dirty solution for this. Turns out it’s not. I have trouble resizing it to a readable size. I could use a simple text and a sprite as background. But it’s not worth the effort. I think i‘ll get rid of the tooltip completely. I can’t manage to create a good substitution for a mouseover on touchscreen, it completely messes up my „on object touched“ and it works without the tooltip. Too much trouble for a little convenience.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)