Home AMX User Forum AMX Design Tools

Active touch buttons

I am wondering if anyone has used active touch buttons. The docs say this:

Active touch: This touch style limits the active touch area to the visible area of the button. Areas of the button that are totally transparent will not respond to a press. For example, if you created a totally transparent button with no border and an icon, only the icon would respond to a press. Similarly, if a transparent button has a visible border but no icon, only the border will respond to a press. Touching the transparent areas of the button does not active the button.

Note: Active Touch requires total transparency on the button in order to work. To make a button totally transparent, set the Overall Opacity (state) setting to 0. If Overall Opacity is set to any other value (for partial transparency), Active Touch will not work.

I don't get the last part. If you set the opacity to 0 then the image disappears! Any other setting and apparently active touch doesn't work. Can anyone make sense of this for me?
Thanks,
Paul

Comments

  • Spire_JeffSpire_Jeff Posts: 1,917
    You make the fill of the button totally transparent. This is used mainly when working with bitmaps/icons. I think the default panel file that ships with new panels has a good demonstration of this.

    Jeff
  • yuriyuri Posts: 861
    isn't this implemented so you can add an icon to a button, and still make the TOTAL button pressable, or is that pass-through?
  • dbradydbrady Posts: 30
    I think it should say set the overall opacity to 255 not 0, then the totally transparent areas in your image will not register as a button push. I think any other value other then 255 will break this feature. I use it when i'm doing navigation on a panel through a house plan layout. For any non square rooms i create a png file with just the shape of the room opaque and the rest transparent. When placed on to the touch panel the transparent part overlaps with another room but because of this feature doesnt register as a button push when pressed(which would wrongly activate that room).
  • a_riot42a_riot42 Posts: 1,624
    dbrady wrote:
    I think it should say set the overall opacity to 255 not 0, then the totally transparent areas in your image will not register as a button push. I think any other value other then 255 will break this feature. I use it when i'm doing navigation on a panel through a house plan layout. For any non square rooms i create a png file with just the shape of the room opaque and the rest transparent. When placed on to the touch panel the transparent part overlaps with another room but because of this feature doesnt register as a button push when pressed(which would wrongly activate that room).


    This is exactly what I am doing and either I am doing something wrong or have found a bug. If a couple of non square rooms have their button boundaries overlap but not the images, then the correct button press happens unless you hit the same button twice. Then the overlapped button gets activated. If you look at the image attached you will see what I mean. I added borders so you can see how they overlap. When touching one and then the other it works fine and the correct room highlights. If you press on the highlighted room the other button that is overlapping gets highlighted even though the area of that button that was touched has no visible area. I thought active touch would prevent this behavior and only allow the image that has any visible area to get activated.
    Many thanks,
    Paul
  • DarksideDarkside Posts: 345
    I think active touch might be confused because the inside of your graphic is transparent too. Try editing your graphic and making the centre (currently transparent) white for a test.

    The tpd button property opacity must be 255, not 0 for sure. I think their reference is to your graphic and to make the transparency areas 'not partial'

    Also, is your graphic a .png? I thought there were issues with transparency (not opacity) with .jpg and .bmps.

    HTH
  • jjamesjjames Posts: 2,908
    Also, is your graphic a .png? I thought there were issues with transparency (not opacity) with .jpg and .bmps.
    Problems = impossible to do. I've never seen a JPG or BMP with any real type of transparency (alpha channel) since it's not supported.

    http://graphicssoft.about.com/cs/faq/a/transparency.htm
  • dbradydbrady Posts: 30
    Well after doing a few tests it does seem to be somewhat buggy. In the attached tp4 file i've made the same overlapping images, one using bitmaps(pngs) and one using chameleon images(pngs). If you do a panel preview the bitmap works as it should but the chameleon images do not. However if you put a border around the bitmaps they stop working. In my mind this feature should realise what is transparent in the final 'rendered' image and not register a button push on those parts. At the moment its hard to tell what it's doing but it is definately not that.
  • a_riot42a_riot42 Posts: 1,624
    Thanks for doing that. I have a test panel that I sent into AMX but I haven't heard back yet. The behavior I am getting is leading me to believe that active touch just doesn't work as it is explained in the documentation. Hopefully I am just doing something wrong.
    Paul
Sign In or Register to comment.