Intro

Contenu du snippet

voila c'est un petit truc pour faire une petite intro avec son pseudo et son mail et son site
c'est configurable , c'est pas un truc extraordinaire mais j'aime bien

Source / Exemple :


alias intro dialog -m intro intro
dialog intro {
  title "Créateur d'intro en picwin"
  size -1 -1 226 204
  option pixels
  tab "Lisez moi", 1, 8 4 207 165
  edit "Pour la création d'intro il faut spécifier la couleur de fond, la couleur de chaque lettre, si on veut mettre un lien e-mail ou site. Sur l'intro, on ne peut mettre que 10 caractère sans compter les liens. Il faut aussi spécifier le temps en seconde entre chaque lettre, si on veut mettre un effet souligné ou pas. Vous trouverai ci-dessous un exemple. Une fois réalisée, cliquez sur tester pour voir le resultat. Si ca vous plais, cliquez sur ok et après taper /myintro. En ce qui concerne le choix des couleurs, il faut répondre par 1,2,3,....,14 ou 15 correspondant aux couleurs proposée par mirc, il ne faut pas mettre le  <= ctrl+k ." 2, 20 40 178 90, tab 1 read multi vsbar
  button "Exemple", 3, 78 140 74 18, tab 1 flat
  tab "Couleurs", 4
  radio "Meme couleurs", 5, 30 52 100 20, tab 4
  radio "Couleurs différentes", 6, 30 74 112 20, tab 4
  box "Pour les caractères", 7, 22 34 172 62, tab 4
  button "Couleur de fond", 8, 22 100 172 20, tab 4 flat
  button "Couleur du ''mail''", 9, 22 122 172 20, tab 4 flat
  button "Couleur du ''site''", 10, 22 144 172 20, tab 4 flat
  tab "Caractères", 11
  text "Caractère 1", 23, 14 38 62 16, tab 11
  text "Caractère 2", 24, 14 64 62 16, tab 11
  text "Caractère 6", 28, 114 38 62 16, tab 11
  text "Caractère 7", 29, 114 64 62 16, tab 11
  text "Caractère 8", 30, 114 90 62 16, tab 11
  text "Caractère 9", 31, 114 116 62 16, tab 11
  text "Caractère 10", 32, 114 142 62 16, tab 11
  text "Caractère 5", 27, 14 142 62 16, tab 11
  text "Caractère 4", 26, 14 116 62 16, tab 11
  text "Caractère 3", 25, 14 90 62 16, tab 11
  edit %cara1, 33, 84 36 22 20, tab 11 center
  edit %cara2, 34, 84 60 22 20, tab 11 center
  edit %cara3, 35, 84 86 22 20, tab 11 center
  edit %cara4, 36, 84 110 22 20, tab 11 center
  edit %cara5, 37, 84 136 22 20, tab 11 center
  edit %cara6, 38, 182 36 22 20, tab 11 center
  edit %cara10, 42, 182 138 22 20, tab 11 center
  edit %cara9, 41, 182 112 22 20, tab 11 center
  edit %cara8, 40, 182 86 22 20, tab 11 center
  edit %cara7, 39, 182 62 22 20, tab 11 center
  tab "Autres", 22
  box "Timer entre chaque lettre", 12, 16 26 190 72, tab 22
  edit %tim, 13, 70 44 24 20, tab 22
  text "seconde(s)", 14, 100 46 62 16, tab 22
  text "Je conseille 1 seconde sinon c'est trop long", 15, 22 68 178 26, disable tab 22 center
  check "oui", 16, 21 108 41 20, tab 22
  check "non", 44, 60 108 41 20, tab 22
  check "non", 17, 160 109 41 20, tab 22
  check "oui", 45, 122 109 36 20, tab 22
  box "Mail", 18, 14 96 92 36, tab 22
  box "Site", 46, 115 96 92 36, tab 22
  box "Souligné", 47, 53 130 109 30, tab 22
  check "oui", 48, 63 142 41 16, tab 22
  check "non", 49, 108 142 41 15, tab 22
  link "Tester", 19, 12 179 38 16
  button "Ok", 20, 60 175 40 24, default flat ok
  button "Cancel", 21, 118 175 48 24, flat cancel
  link "Auteur", 43, 176 179 44 16
}

on *:dialog:*:*:*:{
  if ($dname == intro) {
    if ($devent == init) { 
      if (%mmcol == on) did -c intro 5
      if (%mmcol == off) did -c intro 6
      if (%site == off) { did -c intro 17 | did -u intro 45 }
      if (%site == on) { did -c intro 45 | did -u intro 17 }
      if (%mail == on) { did -c intro 16 | did -u intro 44 }
      if (%mail == off) { did -c intro 44 | did -u intro 16 }
      if (%souligner == on) { did -c intro 48 | did -u intro 49 }
      if (%souligner == off) { did -c intro 49 | did -u intro 48 }
    }
    if ($devent == edit) {
      if ($did == 33) set %cara1 $did(33)
      if ($did == 34) set %cara2 $did(34)
      if ($did == 35) set %cara3 $did(35)
      if ($did == 36) set %cara4 $did(36)
      if ($did == 37) set %cara5 $did(37)
      if ($did == 38) set %cara6 $did(38)
      if ($did == 39) set %cara7 $did(39)
      if ($did == 40) set %cara8 $did(40)
      if ($did == 41) set %cara9 $did(41)
      if ($did == 42) set %cara10 $did(42)
      if ($did == 13) set %tim $did(13)
    }
    if ($devent == sclick) {
      if ($did == 5) {
        set %col0 $$?="Quelle couleur ?" 
        set %col1 %col0
        set %col2 %col0
        set %col3 %col0
        set %col4 %col0
        set %col5 %col0
        set %col6 %col0
        set %col7 %col0
        set %col8 %col0
        set %col9 %col0
        set %col10 %col0
      }
      if ($did == 6) { multi.color | set %mmcol off }
      if ($did == 16) { set %mail on  | did -u intro 44 | set %mail2 $$?="Entrez votre E-mail" }
      if ($did == 44) { set %mail off | did -u intro 16 }
      if ($did == 17) { set %site off | did -u intro 45 }
      if ($did == 45) { set %site on | did -u intro 17 | set %site2 $$?="Entrez votre site" }
      if ($did == 8) set %col.fond $$?="Quelle couleur pour le fond ?"
      if ($did == 9) set %col.mail $$?="Quelle couleur pour le mail ?"
      if ($did == 10) set %col.site $$?="Quelle couleur pour le site ?"
      if ($did == 43) auteur.barre
      if ($did == 3) auteur.barre
      if ($did == 19) myintro
      if ($did == 48) { set %souligner on | did -u intro 49 }
      if ($did == 49) { set %souligner off | did -u intro 48 }
    }
  }
}

alias multi.color {
  set %col1 $$?="Couleur du caractère 1" 
  set %col2 $$?="Couleur du caractère 2" 
  set %col3 $$?="Couleur du caractère 3" 
  set %col4 $$?="Couleur du caractère 4" 
  set %col5 $$?="Couleur du caractère 5" 
  set %col6 $$?="Couleur du caractère 6" 
  set %col7 $$?="Couleur du caractère 7" 
  set %col8 $$?="Couleur du caractère 8" 
  set %col9 $$?="Couleur du caractère 9" 
  set %col10 $$?="Couleur du caractère 10"
}

alias myintro {
  window -hopdidkB +dLu @intro 300 225 200 100
  drawrect -f @intro %col.fond 0 0 0 225 100
  drawline -i @intro %col.fond 1 182 7 193 17
  drawline -i @intro %col.fond 1 182 17 193 7
  drawrect -i @intro %col.fond 2 180 5 15 15
  .timer 1 %tim drawtext @intro %col1 50 40 %cara1
  .timer 1 $calc(%tim * 2) drawtext @intro %col2 60 40 %cara2
  .timer 1 $calc(%tim * 3) drawtext @intro %col3 70 40 %cara3
  .timer 1 $calc(%tim * 4) drawtext @intro %col4 80 40 %cara4
  .timer 1 $calc(%tim * 5) drawtext @intro %col5 90 40 %cara5
  .timer 1 $calc(%tim * 6) drawtext @intro %col6 100 40 %cara6
  .timer 1 $calc(%tim * 7) drawtext @intro %col7 110 40 %cara7
  .timer 1 $calc(%tim * 8) drawtext @intro %col8 120 40 %cara8
  .timer 1 $calc(%tim * 9) drawtext @intro %col9 130 40 %cara9
  .timer 1 $calc(%tim * 10) drawtext @intro %col10 140 40 %cara10
  if (%mail == on) && (%site == off) {
    .timer 1 $calc(%tim * 12) drawtext @intro %col.mail 90 60 M
    .timer 1 $calc(%tim * 13) drawtext @intro %col.mail 100 60 a
    .timer 1 $calc(%tim * 14) drawtext @intro %col.mail 110 60 i
    .timer 1 $calc(%tim * 15) drawtext @intro %col.mail 117 60 l
    if (%souligner == on) {
      .timer 1 $calc(%tim * 16) drawline @intro %col.mail 1 90 73 120 73
    }
  }  
  if (%mail == on) && (%site == on) {
    .timer 1 $calc(%tim * 12) drawtext @intro %col.site 58 60 S
    .timer 1 $calc(%tim * 13) drawtext @intro %col.site 67 60 i
    .timer 1 $calc(%tim * 14) drawtext @intro %col.site 72 60 t
    .timer 1 $calc(%tim * 15) drawtext @intro %col.site 77 60 e
    .timer 1 $calc(%tim * 12) drawtext @intro %col.mail 114 60 M
    .timer 1 $calc(%tim * 13) drawtext @intro %col.mail 124 60 a
    .timer 1 $calc(%tim * 14) drawtext @intro %col.mail 132 60 i
    .timer 1 $calc(%tim * 15) drawtext @intro %col.mail 137 60 l
    if (%souligner == on) {
      .timer 1 $calc(%tim * 16) drawline @intro %col.site 1 58 73 83 73
      .timer 1 $calc(%tim * 16) drawline @intro %col.mail 1 114 73 141 73
    }
  }
  if (%mail == off) && (%site == on) {
    .timer 1 $calc(%tim * 12) drawtext @intro %col.site 90 60 S
    .timer 1 $calc(%tim * 13) drawtext @intro %col.site 100 60 i
    .timer 1 $calc(%tim * 14) drawtext @intro %col.site 110 60 t
    .timer 1 $calc(%tim * 15) drawtext @intro %col.site 117 60 e
    if (%souligner == on) {
      .timer 1 $calc(%tim * 16) drawline @intro %col.site 1 90 73 120 73
    }
  } 
}

menu @intro {
  sclick {
    if ($mouse.x >= 180) && ($mouse.x <= 195) && ($mouse.y >= 5) && ($mouse.y <= 20) { window -c @intro }
    if (%mail == on) && (%site == off) {
      if ($mouse.x >= 90) && ($mouse.x <= 123) && ($mouse.y >= 59) && ($mouse.y <= 77) { run mailto: $+ %mail2 }
    }
    if (%mail == on) && (%site == on) {
      if ($mouse.x >= 56) && ($mouse.x <= 85) && ($mouse.y >= 59) && ($mouse.y <= 77) { run %site2 }
      if ($mouse.x >= 112) && ($mouse.x <= 140) && ($mouse.y >= 59) && ($mouse.y <= 77) { run mailo: $+ %mail2 }
    }
    if (%mail == off) && (%site == on) {
      if ($mouse.x >= 90) && ($mouse.x <= 123) && ($mouse.y >= 59) && ($mouse.y <= 77) { run %site2 }
    }
  }
}

alias auteur.barre {
  window -hopdidkB +dLu @auteur 300 225 200 100
  drawrect -f @auteur 1 0 0 0 225 100
  drawrect @auteur 4 1 180 5 15 15
  drawtext @auteur 4 185 5 x
  .timer 1 1 drawtext @auteur 0 50 40 K
  .timer 1 2 drawtext @auteur 0 63 40 I
  .timer 1 3 drawtext @auteur 0 70 40 N
  .timer 1 4 drawtext @auteur 0 80 40 D
  .timer 1 5 drawtext @auteur 0 90 40 E
  .timer 1 6 drawtext @auteur 0 100 40 R
  .timer 1 7 drawtext @auteur 0 110 40 _
  .timer 1 8 drawtext @auteur 0 120 40 M
  .timer 1 9 drawtext @auteur 0 130 40 A
  .timer 1 10 drawtext @auteur 0 140 40 X
  .timer 1 11 drawtext @auteur 0 150 40 I
  .timer 1 12 drawtext @auteur 4 90 60 M
  .timer 1 13 drawtext @auteur 4 100 60 a
  .timer 1 14 drawtext @auteur 4 110 60 i
  .timer 1 15 drawtext @auteur 4 117 60 l
  .timer 1 16 drawline @auteur 4 1 90 73 120 73
}
menu @auteur {
  sclick {
    if ($mouse.x >= 180) && ($mouse.x <= 195) && ($mouse.y >= 5) && ($mouse.y <= 20) { window -c @auteur }
    if ($mouse.x >= 90) && ($mouse.x <= 123) && ($mouse.y >= 60) && ($mouse.y <= 77) { run mailto:tidjo45@hotmail.com }
  }
}

Conclusion :


pour l'instant aucun bug en vue
merci de me le signaler sinon
pour une prochaine version, j'aimerai mettre des caractères infini, utiliser les $rgb pour les couleurs et aussi pouvoir faire des dégradé
:)

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.