Positioning text relative to the x, y, height of an icon

Hello community,

I am trying to position text relative to the y position of an icon and it is height + 10. Is there away to bind two variables into a a third variable and add an other value to it?

Thank you.

Hi @ahmed,

If I understand correctly,

You want to add Value A to Value B and store the result in Value C, then add +10 to Value C. In this case, you could use the Simple Math - Interface Asset to add the two variables together, and then use a binding converter on the result to add +10.

Kind Regards

Louie

1 Like

Thanks Louie,

I have not found any documentation of how to use it. Also, it does not work on the classic player at the moment which I am using. Will try to figure out.

Sometimes if I need to do multiple binding conversions, I will use a dummy text item off screen to help with one conversion, then bind to that.

For example, bind the dummy text item to the Y value of Icon, with converter +10. Then I’ll bind the the actual text label to the dummy text item with another converter.

I’ll often do this for situations when I first need to ‘format’ a number to a whole number (often in parallax scrolling), then I’ll use another conversion to do the actual thing I want.

Not sure if that helps, but hopefully sparks an idea.

Hello @ahmed,

With Player Classic you could use an Excel interface asset to handle the math.

Setup the formula in the Excel sheet:

In Composer do an update cell action for each value and then a set text.

The set text is to “force” the update of the total from excel.

-Ryan

Hi Ahmed,

The answer will vary if you need to do this for only 1 item in your scene, or for a data template in a data source.
For a single item, you can use an Interface Asset as mentioned by @Louie (Simple Math, Counter, etc…)

For a data template, you most likely want to use a Converter and the issue is that you can have only 1 dynamic value here: the binding input. The parameter of a convert has to be a static value, for ex: your +10.

Another option would be to just group your icon and text in a group, and position that group accordingly (ex: icon X - 10)

If you want to share your XP with us so we can look into it, send us an email at support@intuiface.com (unless it’s the Flags one :slight_smile: )