How to add things to displayed value?

Home Forums General Programming How to add things to displayed value?

This topic contains 2 replies, has 3 voices, and was last updated by goodweather goodweather 2 days, 2 hours ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #85224

    coupe70
    Participant
    • Topics: 3
    • Replies: 2
    • Total: 5

    Hello!
    I managed to change the MIDI range (0-127) of a fader to a displayed value of 0-100.
    But I can’t find out how to add a “%” to the displayed value.
    I’ve seen that in a panel, but it is locked, so I couldn’t look inside.
    Any advise?

    #85227
    Puppeteer
    Puppeteer
    Participant
    • Topics: 15
    • Replies: 180
    • Total: 195
    • ★★

    Use the fixed UI element and then type the list of values you want displayed in the values box. Each line will be indexed, but you can even override the index by listing the index value and the display value.

    I can’t remember the exact syntax and order, but it’s around these forums somewhere.

    The Puppeteer
    http://godlike.com.au

    #85901
    goodweather
    goodweather
    Participant
    • Topics: 38
    • Replies: 324
    • Total: 362
    • ★★

    This is one way of doing but it requires the input of all possible values.

    What I’m usually doing is to not show the value of the uiSlider modulator directly.
    Instead, I create another static uiLabel modulator that you change the content dynamically using a Lua script.
    Then you can write anything you want based on the value (typically, adding a % or a +- sign or even perform some calculation).
    You call the script from your uiSlider “Called when the modulator value change” property.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

There is currently 0 users and 26 guests online
No users are currently active
Forum Statistics
Threads: 2,157, Posts: 15,218, Members: 16,647
Most users ever online was 9 on October 14, 2018 10:42 am
Do NOT follow this link or you will be banned from the site!