Panneau de configuration en picwin

Soyez le premier à donner votre avis sur cette source.

Vue 3 880 fois - Téléchargée 236 fois

Description

Ce script vous permet de faire un panneau de configuration en associant des image à une commande ( et description ) .
La parti disign n'est poa encore au point , je compte l'ameliorer ...

Je vs conseille de prendre le .zip car sinon vs allez jms arriver à faire marcher le script à moins que vs le lisiez entierement ( lol , bon courage ) .

Dans le zip allé ds le repertoir setting\ et ouvrer le fichier config :
à chaque ligne son image associé a sa commande et description :

image.jpg echo test : test du script

si vs mettez un commantaire vs devez séparer la commande et le commantaire par ":" . Sinon de poa mettre les ":" au risq de faire bugger le script .

pour les images la couleur regb est : $rgb(255,0,255)
petit conseille pour éviter les bug : pour creer de nouvel image prenner la mem taille que cel donné en exemple ( perso j'ouvre cel déjà fé et je la modifi ) .

Source / Exemple :


;/!\ prenner le zip /!\

;#########################
;#########################
;###                   ###
;###   configuration   ###
;###                   ###
;#########################
;###                   ###
;###  by aBd0ulaX      ###
;###                   ###
;#########################
;#########################

alias configuration {
  window -dapBkzC +dL @config 1 1 450 300
  set %confread 0
  configuration1
}
alias configuration1 {
  drawrect -f @config 1 1 0 0 450 300
  if ( $read(setting\config, $calc(15+ %confread)) ) {   drawpic -t @config $rgb(255,0,255) 0 0 -340 -210 420 280 $read(setting\config,$calc(15+ %confread)) }
  if ( $read(setting\config, $calc(14+ %confread)) ) {   drawpic -t @config $rgb(255,0,255) 0 0 -260 -210 340 280 $read(setting\config,$calc(14+ %confread)) }
  if ( $read(setting\config, $calc(13+ %confread)) ) {   drawpic -t @config $rgb(255,0,255) 0 0 -180 -210 260 280 $read(setting\config,$calc(13+ %confread)) }
  if ( $read(setting\config, $calc(12+ %confread)) ) {   drawpic -t @config $rgb(255,0,255) 0 0 -100 -210 180 280 $read(setting\config,$calc(12+ %confread)) }
  if ( $read(setting\config, $calc(11+ %confread)) ) {   drawpic -t @config $rgb(255,0,255) 0 0 -20 -210 100 280 $read(setting\config,$calc(11+ %confread)) }

  if ( $read(setting\config, $calc(10+ %confread)) ) {   drawpic -t @config $rgb(255,0,255) 0 0 -340 -125 420 195 $read(setting\config,$calc(10+ %confread)) }
  if ( $read(setting\config, $calc(9+ %confread)) ) {   drawpic -t @config $rgb(255,0,255) 0 0 -260 -125 340 195 $read(setting\config,$calc(9+ %confread)) }
  if ( $read(setting\config, $calc(8+ %confread)) ) {   drawpic -t @config $rgb(255,0,255) 0 0 -180 -125 260 195 $read(setting\config,$calc(8+ %confread)) }
  if ( $read(setting\config, $calc(7+ %confread)) ) {   drawpic -t @config $rgb(255,0,255) 0 0 -100 -125 180 195 $read(setting\config,$calc(7+ %confread)) }
  if ( $read(setting\config, $calc(6+ %confread)) ) {   drawpic -t @config $rgb(255,0,255) 0 0 -20 -125 100 195 $read(setting\config,$calc(6+ %confread)) }

  if ( $read(setting\config, $calc(5+ %confread)) ) {   drawpic -t @config $rgb(255,0,255) 0 0 -340 -40 420 110 $read(setting\config,$calc(5+ %confread)) }
  if ( $read(setting\config, $calc(4+ %confread)) ) {   drawpic -t @config $rgb(255,0,255) 0 0 -260 -40 340 110 $read(setting\config,$calc(4+ %confread)) }
  if ( $read(setting\config, $calc(3+ %confread)) ) {   drawpic -t @config $rgb(255,0,255) 0 0 -180 -40 260 110 $read(setting\config,$calc(3+ %confread)) }
  if ( $read(setting\config, $calc(2+ %confread)) ) {   drawpic -t @config $rgb(255,0,255) 0 0 -100 -40 180 110 $read(setting\config,$calc(2+ %confread)) }
  if ( $read(setting\config, $calc(1+ %confread)) ) {   drawpic -t @config $rgb(255,0,255) 0 0 -20 -40 100 110 $read(setting\config,$calc(1+ %confread)) }
  drawrect @config 15 3 0 0 450 300
  drawrect @config 15 2 0 0 450 24
  drawrect @config 14 1 0 0 450 300
  drawtext @config 3 435 3 x
  drawrect -f @config 3 2 425 42 10 10
  drawrect -f @config 3 2 425 270 10 10
  drawtext @config 9 429 40 -
  drawtext @config 9 427 267 +
}
menu @config {
  mouse { 
    if ($mouse.x >= 425) && ($mouse.x <= 435) && ($mouse.y >= 42) && ($mouse.y <= 52) { drawrect @config 9 1 425 42 10 10 }
    elseif ($mouse.x >= 425) && ($mouse.x <= 435) && ($mouse.y >= 270) && ($mouse.y <= 280) { drawrect @config 9 1 425 270 10 10 }
    elseif ($mouse.x >= 435) && ($mouse.x <= 445) && ($mouse.y >= 3) && ($mouse.y <= 13) { drawtext @config 9 435 3 x }
    elseif ($mouse.x >= 20) && ($mouse.x <= 90) && ($mouse.y >= 40) && ($mouse.y <= 110) && ( $read(setting\config, $calc(1+ %confread)) ) { drawrect @config 14 1 20 40 70 70 | if ( : isin $read(setting\config, $calc(1+ %confread)) ) { drawrect -f @config 1 1 3 3 430 17 | drawtext @config 4 6 3 $mid($read(setting\config, $calc(1+ %confread)),$calc($pos($read(setting\config, $calc(1+ %confread)),:)+2),999999) } }
    elseif ($mouse.x >= 100) && ($mouse.x <= 170) && ($mouse.y >= 40) && ($mouse.y <= 110) && ( $read(setting\config, $calc(2+ %confread)) ) { drawrect @config 14 1 100 40 70 70 | if ( : isin $read(setting\config, $calc(2+ %confread)) ) { drawrect -f @config 1 1 3 3 430 17 | drawtext @config 4 6 3 $mid($read(setting\config, $calc(2+ %confread)),$calc($pos($read(setting\config, $calc(2+ %confread)),:)+2),999999) } }
    elseif ($mouse.x >= 180) && ($mouse.x <= 250) && ($mouse.y >= 40) && ($mouse.y <= 110) && ( $read(setting\config, $calc(3+ %confread)) ) { drawrect @config 14 1 180 40 70 70 | if ( : isin $read(setting\config, $calc(3+ %confread)) ) { drawrect -f @config 1 1 3 3 430 17 | drawtext @config 4 6 3 $mid($read(setting\config, $calc(3+ %confread)),$calc($pos($read(setting\config, $calc(3+ %confread)),:)+2),999999) } }
    elseif ($mouse.x >= 260) && ($mouse.x <= 330) && ($mouse.y >= 40) && ($mouse.y <= 110) && ( $read(setting\config, $calc(4+ %confread)) ) { drawrect @config 14 1 260 40 70 70 | if ( : isin $read(setting\config, $calc(4+ %confread)) ) { drawrect -f @config 1 1 3 3 430 17 | drawtext @config 4 6 3 $mid($read(setting\config, $calc(4+ %confread)),$calc($pos($read(setting\config, $calc(4+ %confread)),:)+2),999999) } }
    elseif ($mouse.x >= 340) && ($mouse.x <= 410) && ($mouse.y >= 40) && ($mouse.y <= 110) && ( $read(setting\config, $calc(5+ %confread)) ) { drawrect @config 14 1 340 40 70 70 | if ( : isin $read(setting\config, $calc(5+ %confread)) ) { drawrect -f @config 1 1 3 3 430 17 | drawtext @config 4 6 3 $mid($read(setting\config, $calc(5+ %confread)),$calc($pos($read(setting\config, $calc(5+ %confread)),:)+2),999999) } }
    elseif ($mouse.x >= 20) && ($mouse.x <= 90) && ($mouse.y >= 125) && ($mouse.y <= 195) && ( $read(setting\config, $calc(6+ %confread)) ) { drawrect @config 14 1 20 125 70 70 | if ( : isin $read(setting\config, $calc(6+ %confread)) ) { drawrect -f @config 1 1 3 3 430 17 | drawtext @config 4 6 3 $mid($read(setting\config, $calc(6+ %confread)),$calc($pos($read(setting\config, $calc(6+ %confread)),:)+2),999999) } }
    elseif ($mouse.x >= 100) && ($mouse.x <= 170) && ($mouse.y >= 125) && ($mouse.y <= 195) && ( $read(setting\config, $calc(7+ %confread)) ) { drawrect @config 14 1 100 125 70 70 | if ( : isin $read(setting\config, $calc(7+ %confread)) ) { drawrect -f @config 1 1 3 3 430 17 | drawtext @config 4 6 3 $mid($read(setting\config, $calc(7+ %confread)),$calc($pos($read(setting\config, $calc(7+ %confread)),:)+2),999999) } }
    elseif ($mouse.x >= 180) && ($mouse.x <= 250) && ($mouse.y >= 125) && ($mouse.y <= 195) && ( $read(setting\config, $calc(8+ %confread)) ) { drawrect @config 14 1 180 125 70 70 | if ( : isin $read(setting\config, $calc(8+ %confread)) ) { drawrect -f @config 1 1 3 3 430 17 | drawtext @config 4 6 3 $mid($read(setting\config, $calc(8+ %confread)),$calc($pos($read(setting\config, $calc(8+ %confread)),:)+2),999999) } }
    elseif ($mouse.x >= 260) && ($mouse.x <= 330) && ($mouse.y >= 125) && ($mouse.y <= 195) && ( $read(setting\config, $calc(9+ %confread)) ) { drawrect @config 14 1 260 125 70 70 | if ( : isin $read(setting\config, $calc(9+ %confread)) ) { drawrect -f @config 1 1 3 3 430 17 | drawtext @config 4 6 3 $mid($read(setting\config, $calc(9+ %confread)),$calc($pos($read(setting\config, $calc(9+ %confread)),:)+2),999999) } }
    elseif ($mouse.x >= 340) && ($mouse.x <= 410) && ($mouse.y >= 125) && ($mouse.y <= 195) && ( $read(setting\config, $calc(10+ %confread)) ) { drawrect @config 14 1 340 125 70 70 | if ( : isin $read(setting\config, $calc(10+ %confread)) ) { drawrect -f @config 1 1 3 3 430 17 | drawtext @config 4 6 3 $mid($read(setting\config, $calc(10+ %confread)),$calc($pos($read(setting\config, $calc(10+ %confread)),:)+2),999999) } }
    elseif ($mouse.x >= 20) && ($mouse.x <= 90) && ($mouse.y >= 210) && ($mouse.y <= 280) && ( $read(setting\config, $calc(11+ %confread)) ) { drawrect @config 14 1 20 210 70 70 | if ( : isin $read(setting\config, $calc(11+ %confread)) ) { drawrect -f @config 1 1 3 3 430 17 | drawtext @config 4 6 3 $mid($read(setting\config, $calc(11+ %confread)),$calc($pos($read(setting\config, $calc(11+ %confread)),:)+2),999999) } }
    elseif ($mouse.x >= 100) && ($mouse.x <= 170) && ($mouse.y >= 210) && ($mouse.y <= 280) && ( $read(setting\config, $calc(12+ %confread)) ) { drawrect @config 14 1 100 210 70 70 | if ( : isin $read(setting\config, $calc(12+ %confread)) ) { drawrect -f @config 1 1 3 3 430 17 | drawtext @config 4 6 3 $mid($read(setting\config, $calc(12+ %confread)),$calc($pos($read(setting\config, $calc(12+ %confread)),:)+2),999999) } }
    elseif ($mouse.x >= 180) && ($mouse.x <= 250) && ($mouse.y >= 210) && ($mouse.y <= 280) && ( $read(setting\config, $calc(13+ %confread)) ) { drawrect @config 14 1 180 210 70 70 | if ( : isin $read(setting\config, $calc(13+ %confread)) ) { drawrect -f @config 1 1 3 3 430 17 | drawtext @config 4 6 3 $mid($read(setting\config, $calc(13+ %confread)),$calc($pos($read(setting\config, $calc(13+ %confread)),:)+2),999999) } }
    elseif ($mouse.x >= 260) && ($mouse.x <= 330) && ($mouse.y >= 210) && ($mouse.y <= 280) && ( $read(setting\config, $calc(14+ %confread)) ) { drawrect @config 14 1 260 210 70 70 | if ( : isin $read(setting\config, $calc(14+ %confread)) ) { drawrect -f @config 1 1 3 3 430 17 | drawtext @config 4 6 3 $mid($read(setting\config, $calc(14+ %confread)),$calc($pos($read(setting\config, $calc(14+ %confread)),:)+2),999999) } }
    elseif ($mouse.x >= 340) && ($mouse.x <= 410) && ($mouse.y >= 210) && ($mouse.y <= 280) && ( $read(setting\config, $calc(15+ %confread)) ) { drawrect @config 14 1 340 210 70 70 | if ( : isin $read(setting\config, $calc(15+ %confread)) ) { drawrect -f @config 1 1 3 3 430 17 | drawtext @config 4 6 3 $mid($read(setting\config, $calc(15+ %confread)),$calc($pos($read(setting\config, $calc(15+ %confread)),:)+2),999999) } }
    else { 
      drawrect @config 3 1 425 42 10 10
      drawrect @config 3 1 425 270 10 10
      drawrect @config 1 1 20 40 70 70
      drawrect @config 1 1 100 40 70 70
      drawrect @config 1 1 180 40 70 70
      drawrect @config 1 1 260 40 70 70
      drawrect @config 1 1 340 40 70 70
      drawrect @config 1 1 20 125 70 70
      drawrect @config 1 1 100 125 70 70
      drawrect @config 1 1 180 125 70 70
      drawrect @config 1 1 260 125 70 70
      drawrect @config 1 1 340 125 70 70
      drawrect @config 1 1 20 210 70 70
      drawrect @config 1 1 100 210 70 70
      drawrect @config 1 1 180 210 70 70
      drawrect @config 1 1 260 210 70 70
      drawrect @config 1 1 340 210 70 70
      drawrect -f @config 1 1 3 3 430 17
      drawtext @config 3 435 3 x
    }
  }
  sclick {
    if ($mouse.x >= 425) && ($mouse.x <= 435) && ($mouse.y >= 42) && ($mouse.y <= 52) && ( %confread > 0 ) { set %confread $calc(%confread -5) | configuration1 }
    elseif ($mouse.x >= 425) && ($mouse.x <= 435) && ($mouse.y >= 270) && ($mouse.y <= 280) && ( %confread < $calc($lines(setting\config)/5+5) ) { set %confread $calc(%confread +5) | configuration1 }
    elseif ($mouse.x >= 20) && ($mouse.x <= 90) && ($mouse.y >= 40) && ($mouse.y <= 110) && ( $read(setting\config, $calc(1+ %confread)) ) { $cmdconfig(1) }
    elseif ($mouse.x >= 100) && ($mouse.x <= 170) && ($mouse.y >= 40) && ($mouse.y <= 110) && ( $read(setting\config, $calc(2+ %confread)) ) { $cmdconfig(2) }
    elseif ($mouse.x >= 180) && ($mouse.x <= 250) && ($mouse.y >= 40) && ($mouse.y <= 110) && ( $read(setting\config, $calc(3+ %confread)) ) { $cmdconfig(3) }
    elseif ($mouse.x >= 260) && ($mouse.x <= 330) && ($mouse.y >= 40) && ($mouse.y <= 110) && ( $read(setting\config, $calc(4+ %confread)) ) { $cmdconfig(4) }
    elseif ($mouse.x >= 340) && ($mouse.x <= 410) && ($mouse.y >= 40) && ($mouse.y <= 110) && ( $read(setting\config, $calc(5+ %confread)) ) { $cmdconfig(5) }
    elseif ($mouse.x >= 20) && ($mouse.x <= 90) && ($mouse.y >= 125) && ($mouse.y <= 195) && ( $read(setting\config, $calc(6+ %confread)) ) { $cmdconfig(6) }
    elseif ($mouse.x >= 100) && ($mouse.x <= 170) && ($mouse.y >= 125) && ($mouse.y <= 195) && ( $read(setting\config, $calc(7+ %confread)) ) { $cmdconfig(7) }
    elseif ($mouse.x >= 180) && ($mouse.x <= 250) && ($mouse.y >= 125) && ($mouse.y <= 195) && ( $read(setting\config, $calc(8+ %confread)) ) { $cmdconfig(8) }
    elseif ($mouse.x >= 260) && ($mouse.x <= 330) && ($mouse.y >= 125) && ($mouse.y <= 195) && ( $read(setting\config, $calc(9+ %confread)) ) { $cmdconfig(9) }
    elseif ($mouse.x >= 340) && ($mouse.x <= 410) && ($mouse.y >= 125) && ($mouse.y <= 195) && ( $read(setting\config, $calc(10+ %confread)) ) { $cmdconfig(10) }
    elseif ($mouse.x >= 20) && ($mouse.x <= 90) && ($mouse.y >= 210) && ($mouse.y <= 280) && ( $read(setting\config, $calc(11+ %confread)) ) { $cmdconfig(11) }
    elseif ($mouse.x >= 100) && ($mouse.x <= 170) && ($mouse.y >= 210) && ($mouse.y <= 280) && ( $read(setting\config, $calc(12+ %confread)) ) { $cmdconfig(12) }
    elseif ($mouse.x >= 180) && ($mouse.x <= 250) && ($mouse.y >= 210) && ($mouse.y <= 280) && ( $read(setting\config, $calc(13+ %confread)) ) { $cmdconfig(13) }
    elseif ($mouse.x >= 260) && ($mouse.x <= 330) && ($mouse.y >= 210) && ($mouse.y <= 280) && ( $read(setting\config, $calc(14+ %confread)) ) { $cmdconfig(14) }
    elseif ($mouse.x >= 340) && ($mouse.x <= 410) && ($mouse.y >= 210) && ($mouse.y <= 280) && ( $read(setting\config, $calc(15+ %confread)) ) { $cmdconfig(15) }
    elseif ($mouse.x >= 435) && ($mouse.x <= 445) && ($mouse.y >= 3) && ($mouse.y <= 13) { window -c @config }
    else { placeconfig $calc($mouse.dx - $window($active).x) $calc($mouse.dy - $window($active).y) }
  }
  close :/window -c @config
}

alias cmdconfig { 
  if ( : isin $read(setting\config, $calc($1 + %confread)) ) { return $mid($read(setting\config, $calc($1 + %confread)),$pos($read(setting\config, $calc($1 + %confread)),$chr(32)),$calc($pos($read(setting\config, $calc( $1 + %confread)),:)-1-$pos($read(setting\config, $calc( $1 + %confread)),$chr(32)))) }
  else { return $mid($read(setting\config, $calc($1 + %confread)),$pos($read(setting\config, $calc($1 + %confread)),$chr(32)),9999999) }
}
alias placeconfig {  window @config $calc($mouse.dx - $1) $calc($mouse.dy - $2) | if ($mouse.key & 1) .timer $+ $ticks -m 1 0 placeconfig $1- }

Conclusion :


have fun

by abdoulax

Codes Sources

A voir également

Ajouter un commentaire Commentaires
Messages postés
13
Date d'inscription
lundi 28 juin 2004
Statut
Membre
Dernière intervention
24 mai 2005

lol kler chu déséspéré !
Messages postés
3
Date d'inscription
mardi 21 octobre 2003
Statut
Membre
Dernière intervention
24 avril 2004

débutant ? tu va désespéré des débutant la :'(
Messages postés
875
Date d'inscription
samedi 17 mai 2003
Statut
Membre
Dernière intervention
22 juin 2012

mdr je ve un comments , lol

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.