Modification couleur d’un indicateur selon 3 états

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #173587 quote
    Blondin
    Participant
    New

    Bonjour,

    je cherche un code permettant de modifier la couleur d’une courbe (une sorte de MM  servant de stop) selon divers indicateurs perso. Il faudrait que la courbe apparaisse en vert, bleu ou rouge selon certaines conditions.  Je ne trouve pas de solution. Pourriez vos m’aider svp ?
    Merci

    #173591 quote
    JC_Bywan
    Moderator
    Master

    Bonjour, supposons que la courbe s’appelle mm et que le code actuel non montré se termine par “return mm”.

    Alors il faut faire quelque chose de ce style, après avoir défini les 3 jeux de conditions nommés etat1, etat2, etat3. On peut bien sûr changer chaque trio r,g,b pour avoir d’autres nuances, voir des combinaisons RGB là: http://cloford.com/resources/colours/500col.htm

    if etat1 then
     r=0
     g=255
     b=0
    elsif etat2 then
     r=0
     g=0
     b=255
    elsif etat3 then
     r=255
     g=0
     b=0
    endif
    
    return mm coloured(r,g,b)
    #173603 quote
    Blondin
    Participant
    New

    super merci

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Modification couleur d’un indicateur selon 3 états


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Blondin @fbainier Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Blondin
4 years, 8 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 07/13/2021
Status: Active
Attachments: No files
Logo Logo
Loading...