dialog -l colo {
  title "[•-»Colore menu«-•]"
  size -1 -1 116 217
  option dbu
  icon 1, 8 15 100 12, Addon\Dll\xpopup\mc.bmp, 0
  icon 2, 8 40 100 12, Addon\Dll\xpopup\mc1.bmp, 0
  icon 3, 8 65 100 12, Addon\Dll\xpopup\mc2.bmp, 0
  icon 4, 8 90 100 12, Addon\Dll\xpopup\mc3.bmp, 0
  icon 5, 8 115 100 12, Addon\Dll\xpopup\mc4.bmp, 0
  icon 6, 8 140 100 12, Addon\Dll\xpopup\mc5.bmp, 0
  icon 7, 8 165 100 12, Addon\Dll\xpopup\mc6.bmp, 0
  button "[•-»Salva ed Esci«-•]", 8, 8 198 100 12, ok
  radio "Opzione 1", 9, 8 30 50 8
  radio "Opzione 2", 10, 8 55 50 8
  radio "Opzione 3", 11, 8 80 50 8
  radio "Opzione 4", 12, 8 105 50 8
  radio "Opzione 5", 13, 8 130 50 8
  radio "Opzione 6", 14, 8 155 50 8
  radio "Opzione 7", 15, 8 180 50 8
  text "Seleziona il colore per lo sfondo dei menů", 16, 1 3 131 8
}

alias colon { dialog -m colo colo }

on 1:dialog:colo:sclick:9:{ set %coloremenu 1 }
on 1:dialog:colo:sclick:10:{ set %coloremenu 2 }
on 1:dialog:colo:sclick:11:{ set %coloremenu 3 }
on 1:dialog:colo:sclick:12:{ set %coloremenu 4 }
on 1:dialog:colo:sclick:13:{ set %coloremenu 5 }
on 1:dialog:colo:sclick:14:{ set %coloremenu 6 }
on 1:dialog:colo:sclick:15:{ set %coloremenu 7 }
on 1:dialog:colo:init:0:{ 
  if ( %coloremenu == 1 ) { did -c colo 9 }
  if ( %coloremenu == 2 ) { did -c colo 10 }
  if ( %coloremenu == 3 ) { did -c colo 11 }
  if ( %coloremenu == 4 ) { did -c colo 12 }
  if ( %coloremenu == 5 ) { did -c colo 13 }
  if ( %coloremenu == 6 ) { did -c colo 14 }
  if ( %coloremenu == 7 ) { did -c colo 15 }
}
alias shell {
  return $mircdirImmagini\Belief2.bmp
}

alias xpopdll {
  if ($isid) return $dll($mircdirAddon\Dll\xpopup\XPopup.dll,$1,$2-)
  else dll " $+ $mircdirAddon\Dll\xpopup\XPopup.dll" $1 $2-
}

alias uxpop dll -u xpopup.dll

alias xpop {

  if ( $isid ) {
    return $xpopdll( _xpop, $1 $prop $2- )
  }
  else {
    xpopdll xpop $2 $1 $3-
  }
}

alias xpopup {

  if ( $isid ) {
    return $xpopdll( _xpopup, $1 $prop $2- )
  }
  else {
    xpopdll xpopup $2 $1 $3-
  }
}

alias mpopup {
  xpopdll mpopup $1 $2
}

ON *:SIGNAL:Xpopup-*: { 
  echo -s $signal : $1-
}

alias xtest { 

  if ( $xpopup(mymenu).ismenu == $false ) {

    xpopup -c mymenu custom
    xpopup -x mymenu +dp

    xpopup -b mymenu $mircdirAddon\Dll\xpopup/mc.bmp

    xpopup -i mymenu 0 $shell

    xpop -a mymenu 0 $chr(9) + 1 1 Menu Item 2 $chr(9) blah
    xpop -a mymenu 0 $chr(9) + 0 0 -
    xpop -a mymenu 0 $chr(9) +s 2 1 Menu Item 2

    xpop -a mymenu 3 0 $chr(9) + 10 1 $eval($me,0)
    xpop -a mymenu 3 0 $chr(9) + 0 0 -
    xpop -a mymenu 3 0 $chr(9) +c 11 0 Menu Item 2 2

    xpop -a mymenu 0 $chr(9) +c 3 0 Menu Item 3
    xpop -a mymenu 0 $chr(9) +cg 4 0 Menu Item 4
    xpop -a mymenu 0 $chr(9) +g 5 1 Menu Item 5
    xpop -a mymenu 0 $chr(9) +c 6 1 Menu Item 6
    xpop -a mymenu 0 $chr(9) +cg 7 1 Menu Item 7
  }

  xpopup -s mymenu +mcv 500 500
}

on 1:dialog:colo:sclick:8:{
  if ( %coloremenu == 1 ) {
    xpopup -i mirc 0 $shell
    mpopup mirc 1
    xpopup -t mirc custom
    xpopup -b mirc $mircdirAddon\Dll\xpopup/mc.bmp
    xpopup -i mircbar 0 $shell
    mpopup mircbar 1
    xpopup -t mircbar custom
    xpopup -b mircbar $mircdirAddon\Dll\xpopup/mc.bmp
  }
  if ( %coloremenu == 2 ) {
    xpopup -i mirc 0 $shell
    mpopup mirc 1
    xpopup -t mirc custom
    xpopup -b mirc $mircdirAddon\Dll\xpopup/mc1.bmp
    xpopup -i mircbar 0 $shell
    mpopup mircbar 1
    xpopup -t mircbar custom
    xpopup -b mircbar $mircdirAddon\Dll\xpopup/mc1.bmp
  }
  if ( %coloremenu == 3 ) {
    xpopup -i mirc 0 $shell
    mpopup mirc 1
    xpopup -t mirc custom
    xpopup -b mirc $mircdirAddon\Dll\xpopup/mc2.bmp
    xpopup -i mircbar 0 $shell
    mpopup mircbar 1
    xpopup -t mircbar custom
    xpopup -b mircbar $mircdirAddon\Dll\xpopup/mc2.bmp
  }
  if ( %coloremenu == 4 ) {
    xpopup -i mirc 0 $shell
    mpopup mirc 1
    xpopup -t mirc custom
    xpopup -b mirc $mircdirAddon\Dll\xpopup/mc3.bmp
    xpopup -i mircbar 0 $shell
    mpopup mircbar 1
    xpopup -t mircbar custom
    xpopup -b mircbar $mircdirAddon\Dll\xpopup/mc3.bmp
  }
  if ( %coloremenu == 5 ) {
    xpopup -i mirc 0 $shell
    mpopup mirc 1
    xpopup -t mirc custom
    xpopup -b mirc $mircdirAddon\Dll\xpopup/mc4.bmp
    xpopup -i mircbar 0 $shell
    mpopup mircbar 1
    xpopup -t mircbar custom
    xpopup -b mircbar $mircdirAddon\Dll\xpopup/mc4.bmp
  }
  if ( %coloremenu == 6 ) {
    xpopup -i mirc 0 $shell
    mpopup mirc 1
    xpopup -t mirc custom
    xpopup -b mirc $mircdirAddon\Dll\xpopup/mc5.bmp
    xpopup -i mircbar 0 $shell
    mpopup mircbar 1
    xpopup -t mircbar custom
    xpopup -b mircbar $mircdirAddon\Dll\xpopup/mc5.bmp
  }
  if ( %coloremenu == 7 ) {
    xpopup -i mirc 0 $shell
    mpopup mirc 1
    xpopup -t mirc custom
    xpopup -b mirc $mircdirAddon\Dll\xpopup/mc6.bmp
    xpopup -i mircbar 0 $shell
    mpopup mircbar 1
    xpopup -t mircbar custom
    xpopup -b mircbar $mircdirAddon\Dll\xpopup/mc6.bmp
  }
}

alias startolo { 
  if ( %coloremenu == 1 ) {
    xpopup -i mirc 0 $shell
    mpopup mirc 1
    xpopup -t mirc custom
    xpopup -b mirc $mircdirAddon\Dll\xpopup/mc.bmp
    xpopup -i mircbar 0 $shell
    mpopup mircbar 1
    xpopup -t mircbar custom
    xpopup -b mircbar $mircdirAddon\Dll\xpopup/mc.bmp
  }
  if ( %coloremenu == 2 ) {
    xpopup -i mirc 0 $shell
    mpopup mirc 1
    xpopup -t mirc custom
    xpopup -b mirc $mircdirAddon\Dll\xpopup/mc1.bmp
    xpopup -i mircbar 0 $shell
    mpopup mircbar 1
    xpopup -t mircbar custom
    xpopup -b mircbar $mircdirAddon\Dll\xpopup/mc1.bmp
  }
  if ( %coloremenu == 3 ) {
    xpopup -i mirc 0 $shell
    mpopup mirc 1
    xpopup -t mirc custom
    xpopup -b mirc $mircdirAddon\Dll\xpopup/mc2.bmp
    xpopup -i mircbar 0 $shell
    mpopup mircbar 1
    xpopup -t mircbar custom
    xpopup -b mircbar $mircdirAddon\Dll\xpopup/mc2.bmp
  }
  if ( %coloremenu == 4 ) {
    xpopup -i mirc 0 $shell
    mpopup mirc 1
    xpopup -t mirc custom
    xpopup -b mirc $mircdirAddon\Dll\xpopup/mc3.bmp
    xpopup -i mircbar 0 $shell
    mpopup mircbar 1
    xpopup -t mircbar custom
    xpopup -b mircbar $mircdirAddon\Dll\xpopup/mc3.bmp
  }
  if ( %coloremenu == 5 ) {
    xpopup -i mirc 0 $shell
    mpopup mirc 1
    xpopup -t mirc custom
    xpopup -b mirc $mircdirAddon\Dll\xpopup/mc4.bmp
    xpopup -i mircbar 0 $shell
    mpopup mircbar 1
    xpopup -t mircbar custom
    xpopup -b mircbar $mircdirAddon\Dll\xpopup/mc4.bmp
  }
  if ( %coloremenu == 6 ) {
    xpopup -i mirc 0 $shell
    mpopup mirc 1
    xpopup -t mirc custom
    xpopup -b mirc $mircdirAddon\Dll\xpopup/mc5.bmp
    xpopup -i mircbar 0 $shell
    mpopup mircbar 1
    xpopup -t mircbar custom
    xpopup -b mircbar $mircdirAddon\Dll\xpopup/mc5.bmp
  }
  if ( %coloremenu == 7 ) {
    xpopup -i mirc 0 $shell
    mpopup mirc 1
    xpopup -t mirc custom
    xpopup -b mirc $mircdirAddon\Dll\xpopup/mc6.bmp
    xpopup -i mircbar 0 $shell
    mpopup mircbar 1
    xpopup -t mircbar custom
    xpopup -b mircbar $mircdirAddon\Dll\xpopup/mc6.bmp
  }
}

on *:Start:{ startolo }
