Zum Inhalt springen
AppgineeringAppgineering
Shop
Schreibgeschützt6 Beiträge · 4,109 Aufrufe · Erstellt 23 Mar 2020, 10:22

Display dynamic image with script.

Archiviert: Diskussion auf Discord verlagertDiscord
Dwayne P.Ursprünglicher Verfasser
· bearbeitet
#1

Hi guys, quick question.

Is it possible to show an dynamic image instead of text?

I wanna make something for multiclass that appears to class leaders only.

So instead of showing LAP # or something, id like to show an image.

See code below:

if (result.ClassPosition == 1)
// return dynamic image instead of text.

Edit:

See where it shows "Class Leader", I'd like to have a picture on those spots instead.
View image on i.imgur.com

#2

I use it for put a PIT label. I don't replace texte by image, only replace texte by "" and put over a subwidget with variable backround ON when information PIT is on. A way for you ;)

Nick ThissenAppgineering
#3

A simple solution could be to use a Label with a dynamic image background. Use the classposition as the binding, then make sure there is an image with name "1", but no images for any other positions. The first classposition should show the "1" image, the rest should not show any image.

Then also return an empty text for the classleader.

#4

Nick Thissen wrote:
A simple solution could be to use a Label with a dynamic image background. Use the classposition as the binding, then make sure there is an image with name "1", but no images for any other positions. The first classposition should show the "1" image, the rest should not show any image.

Then also return an empty text for the classleader.

Is it possible to use multiple bindings for this? For example to use class {0} to determine a folder, and use classposition {1} to the proper picture?
For example, a file path would look something like this: overallclassification/{0}/{1}.png

Is this possible in the current ATVO Theme editor?

Nick ThissenAppgineering
#5

Yes. You can add multiple bindings in the 'Select data bindings' window. If you use multiple bindings, then you can refer to them by {0}, {1}, {2}, etc in the format string, in the order in which they are listed in the bindings window.

You can use your 'overallclassification/{0}/{1}.png' as the Path in the dynamic image, and then add your two bindings.

#6

Nick Thissen wrote:
Yes. You can add multiple bindings in the 'Select data bindings' window. If you use multiple bindings, then you can refer to them by {0}, {1}, {2}, etc in the format string, in the order in which they are listed in the bindings window.

You can use your 'overallclassification/{0}/{1}.png' as the Path in the dynamic image, and then add your two bindings.

Thank you, got it working just a second ago after some fiddling :)

Dieser Thread ist archiviert.

Neue Antworten finden auf Discord statt.

Auf Discord weiterlesen