Add on couleur v1.1

Contenu du snippet

Ben voila c'est mon add on couleur !!!

Source / Exemple :


dialog color {
  title "Couleur d'ecriture By [VeSpArO]"
  size -1 -1 325 192
  option dbu
  box "Ecriture", 1, 1 1 158 75
  button "Blanc", 2, 4 8 30 22
  button "Noir", 3, 35 8 30 22
  button "Bleu Foncé", 4, 66 8 30 22
  button "Vert", 5, 97 8 30 22
  button "Rouge", 6, 128 8 30 22
  button "Marron", 7, 4 30 30 22
  button "Violet", 8, 35 30 30 22
  button "Orange", 9, 66 30 30 22
  button "Jaune", 10, 97 30 30 22
  button "Vert Clair", 11, 128 30 30 22
  button "Cyan", 12, 4 52 30 22
  button "Bleu Clair", 13, 35 52 30 22
  button "Bleu Marine", 14, 66 52 30 22
  button "Rose", 15, 97 52 30 22
  button "Gris", 16, 128 52 30 22
  box "Fond", 17, 160 1 160 75
  button "Blanc", 18, 160 8 30 22
  button "Noir", 19, 191 8 30 22
  button "Bleu Foncé", 20, 222 8 30 22
  button "Vert", 21, 253 8 30 22
  button "Rouge", 22, 284 8 30 22
  button "Marron", 23, 160 30 30 22
  button "Violet", 24, 191 30 30 22
  button "Orange", 25, 222 30 30 22
  button "Jaune", 26, 253 30 30 22
  button "Vert Clair", 27, 284 30 30 22
  button "Cyan", 28, 160 52 30 22
  button "Bleu Clair", 29, 191 52 30 22
  button "Bleu Marine", 30, 222 52 30 22
  button "Rose", 31, 253 52 30 22
  button "Gris", 32, 284 52 30 22
  box "Avant et après", 33, 1 78 195 50
  text "Texte Avant :", 34, 14 95 33 8
  edit %avant, 35, 45 95 33 9, autohs
  text "Texte Après :", 36, 117 95 34 8
  edit %Après, 37, 151 95 41 9, autohs
  box "Autres Options", 38, 1 128 195 48
  text "Gras", 39, 44 150 18 8
  text "Souligné", 40, 44 135 25 8
  button "Activer", 41, 93 135 37 12
  button "Désactiver", 42, 141 135 37 12
  button "Activer", 43, 93 150 37 12
  button "Désactiver", 44, 141 150 37 12
  button "OK", 45, 150 180 32 12, flat ok
}
on 1:dialog:color:sclick:02 { set %Ec.Coul 0 }
on 1:dialog:color:sclick:03 { set %Ec.Coul 1 }
on 1:dialog:color:sclick:04 { set %Ec.Coul 2 }
on 1:dialog:color:sclick:05 { set %Ec.Coul 3 }
on 1:dialog:color:sclick:06 { set %Ec.Coul 4 }
on 1:dialog:color:sclick:07 { set %Ec.Coul 5 }
on 1:dialog:color:sclick:08 { set %Ec.Coul 6 }
on 1:dialog:color:sclick:09 { set %Ec.Coul 7 }
on 1:dialog:color:sclick:10 { set %Ec.Coul 8 }
on 1:dialog:color:sclick:11 { set %Ec.Coul 9 }
on 1:dialog:color:sclick:12 { set %Ec.Coul 10 }
on 1:dialog:color:sclick:13 { set %Ec.Coul 11 }
on 1:dialog:color:sclick:14 { set %Ec.Coul 12 }
on 1:dialog:color:sclick:15 { set %Ec.Coul 13 }
on 1:dialog:color:sclick:16 { set %Ec.Coul 14 }

on 1:dialog:color:sclick:18 { set %Ec.coul.fd 0 | set %Ec.coul.fd2 ,0 }
on 1:dialog:color:sclick:19 { set %Ec.coul.fd 1 | set %Ec.coul.fd2 ,1 }
on 1:dialog:color:sclick:20 { set %Ec.coul.fd 2 | set %Ec.coul.fd2 ,2 }
on 1:dialog:color:sclick:21 { set %Ec.coul.fd 3 | set %Ec.coul.fd2 ,3 }
on 1:dialog:color:sclick:22 { set %Ec.coul.fd 4 | set %Ec.coul.fd2 ,4 }
on 1:dialog:color:sclick:23 { set %Ec.coul.fd 5 | set %Ec.coul.fd2 ,5 }
on 1:dialog:color:sclick:24 { set %Ec.coul.fd 6 | set %Ec.coul.fd2 ,6 }
on 1:dialog:color:sclick:25 { set %Ec.coul.fd 7 | set %Ec.coul.fd2 ,7 }
on 1:dialog:color:sclick:26 { set %Ec.coul.fd 8 | set %Ec.coul.fd2 ,8 }
on 1:dialog:color:sclick:27 { set %Ec.coul.fd 9 | set %Ec.coul.fd2 ,9 }
on 1:dialog:color:sclick:28 { set %Ec.coul.fd 10 | set %Ec.coul.fd2 ,10 }
on 1:dialog:color:sclick:29 { set %Ec.coul.fd 11 | set %Ec.coul.fd2 ,11 }
on 1:dialog:color:sclick:30 { set %Ec.coul.fd 12 | set %Ec.coul.fd2 ,12 }
on 1:dialog:color:sclick:31 { set %Ec.coul.fd 13 | set %Ec.coul.fd2 ,13 }
on 1:dialog:color:sclick:32 { set %Ec.coul.fd 14 | set %Ec.coul.fd2 ,14 }

on 1:dialog:color:sclick:41 { set %gras  }
on 1:dialog:color:sclick:42 { set %gras }
on 1:dialog:color:sclick:43 { set %souligné  }
on 1:dialog:color:sclick:44 { set %souligné }

on 1:dialog:color:edit:35 { set %Avant $did(color,35) }
on 1:dialog:color:edit:37 { set %Après $did(color,37) }

on *:INPUT:*:{ 
  if (%Ec.coul != $null ) {
    if ( ! isin $1 ) { goto fin }  
    if ( - isin $1 ) { goto fin }  
    if ( + isin $1 ) { goto fin }  
    if ( / isin $1 ) { goto fin }  
    if ( %Avant != $null ) { msg $active %avant  $+ %Ec.coul $+ %Ec.coul.fd2 $+ %gras $+ %souligné $1-  %après }
    if ( %Avant == $null ) { msg $active  $+ %Ec.coul $+ %Ec.coul.fd2 $+ %gras $+ %souligné $1- }
    haltdef  
    :fin
  }
}
menu * {
-
  Couleur d'ecriture By [VeSpArO]:/dialog -m color color
-
}

Conclusion :


Normalement pas de bug vu ke j'ai relit la source !!!
Svp laissé By [VeSpArO] et ne rippé pas kwa mci d'avance ;)

++

A voir également

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.