How do I get a pin without excess movement when scrolling?

0 favourites
  • 3 posts
From the Asset Store
Wall Pin Board is a hyper causal game developed for fun and inspired by YouTube video whose link is given in description
  • Seems like I've had a bunch of very basic questions lately, just double checking on some basic things.

    * Sprite.A with drag drop behavior (vertical scrolling for a chat area):

    Sprite.B pinned (pin behavior or hierarchy) to sprite.A works perfectly when scolling sprite.A

    The issue is: any of the items that are html(?) based (an iframe, textinput, list, etc.) can't be "pinned" via hierarchy and the pin behavior is very loose (while dragging Sprite.A, the html item can be 0 to 50 pixels off on the y axis. On drop the html item "catches up" and is position to sprite.A gets back to the correct position).

    It's always been this way (for at least 5 years).

    Does anyone know of a way to tighten the pinning of these items so they don't look like they are floating?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeah, form control objects don't like being scrolled. The best solution is not to use them. But if you must use textboxes and lists, you can try positioning them with events. Say, on every tick set TextBox Y to SpriteA.Y+offset, maybe this will work better than Pin behavior.

  • Just sharing a solution that works pretty well so perhaps I'll remember next time.

    + Touch: On any touch start

    + Touch: Is touching Sprite

    -> Sprite: Spawn TextInput10 on layer 0 (image point 0) (create hierarchy: False)

    -> TextInput10: Set focused

    + TextInput10: [X] Is focused

    -> TextInput10: Destroy

    -> Sprite: Set visibility Visible

    + TextInput10: Is focused

    -> Sprite: Set visibility Invisible

    -> TextInput10: Set CSS style "border-radius" to "10px"

    -> TextInput10: Set CSS style "font-size" to 2.5&"vh"

    -> TextInput10: Set CSS style "border-radius" to "15px"

    -> TextInput10: Set CSS style "outline" to "transparent"

    Basically just replacing the textinput with a sprite unless it's in focus. From an aesthetics standpoint, the pins looks 50x better this way.

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