mIRC-tac-toe — File Browser

mIRC-tac-toev2.5 / mIRC-tac-toev2.5 / window.ini

window.ini — 3.16 KB — Download this file

[script]
n0=alias questionwindow {
n1=  %winwidth = $width( $5- , System , 20,0,0)
n2=  %twidth = %winwidth
n3=  if ( %winwidth < 400 ) {
n4=  %winwidth = 400 }
n5=  else {
n6=  inc %winwidth 30 }
n7=  %windowok = $1
n8=  %windowcancel = $2
n9=  window -ap +ntb @question $centerw( %winwidth ) $centerh(200) %winwidth 200
n10=  drawfill @question 15 15 0 0
n11=  %button1.width = $calc( $width( $3 , System , 20 , 0,0) + 30 )
n12=  %button2.width = $calc( $width( $4 , System , 20,0,0) + 30 )
n13=  drawtext @question 1 System 20 $calc( [ $window( @question ).bw ] / 2 - [ %twidth ] / 2 ) 10 $5-
n14=  ; draw button 1
n15=  %button1.x = $int( $calc( [ $window( @question ).bw ] / 2 - [ %button1.width ] - 5 )) 
n16=  drawrect @question 0 1 %button1.x $int( $calc( [ $window( @question ).bh ] - 50 )) %button1.width 20
n17=  drawline @question 1 1 %button1.x $int( $calc( [ $window( @question ).bh ] - 30 )) $calc( %button1.x + %button1.width ) $int( $calc( [ $window( @question ).bh ] - 30 ))
n18=  drawline @question 1 1 $int( $calc( [ $window( @question ).bw ] / 2 - 5 )) $int( $calc( [ $window( @question ).bh ] - 50 )) $int( $calc( [ $window( @question ).bw ] / 2 - 5 )) $int( $calc( [ $window( @question ).bh ] - 30 ))
n19=  drawtext @question 1 System 20 $calc( %button1.x + 15 ) $int( $calc( [ $window( @question ).bh ] - 50 )) $3
n20=  ; draw button 2
n21=  %button2.x = $int( $calc( [ $window( @question ).bw ] / 2 + 5 ))
n22=  drawrect @question 0 1 %button2.x $int( $calc( [ $window( @question ).bh ] - 50 )) %button2.width 20
n23=  drawline @question 1 1 %button2.x $int( $calc( [ $window( @question ).bh ] - 30 )) $int( $calc( %button2.x + %button2.width )) $int( $calc( [ $window( @question ).bh ] - 30 ))
n24=  drawline @question 1 1 $int( $calc( %button2.x + %button2.width )) $int( $calc( [ $window( @question ).bh ] - 50 )) $int( $calc( %button2.x + %button2.width )) $int( $calc( [ $window( @question ).bh ] - 30 ))
n25=  drawtext @question 1 System 20 $calc( %button2.x + 15 ) $int( $calc( [ $window( @question ).bh ] - 50 )) $4
n26=  ; draw graphic
n27=  drawdot @question 1 20 52 60
n28=  drawdot @question 8 19 52 60
n29=  drawtext @question 1 System 40 40 40 ?
n30=}
n31=menu @question {
n32=  sclick: {
n33=    if ( $clickedok ) {
n34=      %clickedok = YES
n35=      %windowok
n36=      window -c @question
n37=      unset %clickedok
n38=    }
n39=    if ( $clickedcancel ) {
n40=      %clickedok = NO
n41=      %windowcancel
n42=      window -c @question
n43=      unset %clickedok
n44=    }
n45=  }
n46=}
n47=on 1:close:@question:if ( %clickedok == %null ) %windowcancel
n48=alias clickedok {
n49=  return $inrect( $mouse.x , $mouse.y , %button1.x , $int( $calc( [ $window( @question ).bh ] - 50 )) , %button1.width , 20 )
n50=}
n51=alias clickedcancel {
n52=  return $inrect( $mouse.x , $mouse.y , %button2.x , $int( $calc( [ $window( @question ).bh ] - 50 )) , %button2.width , 20 )
n53=}
n54=alias centerw return $int( $calc( [ $window(-1).w ] / 2 - [ $1 ] / 2 ) )
n55=alias centerh return $int( $calc( [ $window(-1).h ] / 2 - [ $1 ] / 2 ) )
n56=alias nullAlias return $null
n57=alias echook echo 4 -a OK
n58=alias echocancel echo 4 -a CANCEL