Results 1 to 6 of 6

Thread: Question on TouchStripComponent

  1. #1
    Lesser Knight
    Join Date
    Jul 2011
    Posts
    51

    Default Question on TouchStripComponent

    How can I stop the component from registering touch when I move my finger outside the boundaries of the parent entity?


    Also, if I may ask, how does the "m_pBmpBorderFileName" variable from the rectangle render component work exactly?
    I tried to set a rttex file but it made no difference whatsoever.

  2. #2
    Lesser Knight
    Join Date
    Jul 2011
    Posts
    51

    Default

    Bump...........

  3. #3
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,343

    Default

    Hey darkchazz,

    I'm not sure about the first question.. you could probably add a input filter to the parent so the child won't get the messages. I use that component for the touch pad usually so it's always on top for me, not in a scrolling menu or anything so I'm not sure.

    On the second one, here is how to make a bitmap border rect:

    Entity *pQuickToolBG = CreateOverlayRectEntity(pBG, ..size stuff..., DEFAULT_RECT_MIDDLE_COLOR);

    //preset up the bitmap we'll use, only have to do this once really
    GetResourceManager()->GetSurfaceAnim("game/gui_box.rttex")->SetupAnimBySize(10,10);

    pQuickToolBG->GetComponentByName("RectRender")->GetVar("bmpBorderFileName")->Set("game/gui_box.rttex");

    And that should be it. The rect border should now look like those on Growtopia, if you use the attached image.

    Name:  gui_box.png
Views: 36
Size:  3.4 KB
    Seth A. Robinson
    Robinson Technologies

  4. #4
    Lesser Knight
    Join Date
    Jul 2011
    Posts
    51

    Default

    Hi Seth, thanks for the informative reply!

    Quote Originally Posted by Seth View Post
    I'm not sure about the first question.. you could probably add a input filter to the parent so the child won't get the messages. I use that component for the touch pad usually so it's always on top for me, not in a scrolling menu or anything so I'm not sure.
    I'm not using it in a scrolling menu...
    Actually I use a touchpad as well and I'm having a problem with it: if I press and hold the pad and then move my finger outside the pad without releasing it, the touchpad is still being pressed until I lift my finger.
    Usually I wouldn't care but I have a couple of touchpads each on the opposite side of the screen. Pressing on one then moving my finger to the other messes things up


    And about the rectangle border. Turns out I made the mistake of applying the border image to "m_pBmpBorderFileName" instead of "bmpBorderFileName"
    Good example though
    Thanks

  5. #5
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,343

    Default

    Try using TouchHandlerArcadeComponent instead of TouchHandlerComponent in your buttons - this new version fixes a lot of issues.
    Seth A. Robinson
    Robinson Technologies

  6. #6
    Lesser Knight
    Join Date
    Jul 2011
    Posts
    51

    Default

    Works like a charm!
    problem solved. thanks

Similar Threads

  1. Question
    By Player3D3 in forum RTsoft Tavern
    Replies: 6
    Last Post: 07-31-2013, 03:29 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •