All pastes #740292 Raw Edit

Stuff

public text v1 · immutable
·published 2007-10-17 20:44 UTC
rendered paste body
alias mywintex {
  /window -pkodC @WinText -1 -1 140 100
  /texbtn
}
alias -l texbtn {
  /drawrect -rfd @WinText $rgb(100,200,200) 1 40 1 90 70 10 10
  /drawrect -rfd @WinText $rgb(110,210,210) 1 40 1 90 40 10 10
  /drawrect -rfd @WinText $rgb(120,220,220) 1 40 1 90 30 10 10
  /drawrect -rfd @WinText $rgb(130,230,230) 1 40 1 90 20 10 10
  /drawtext @WinText 0 Tahoma 14 70 27 Close
}
menu @WinText {
  sclick: $iif($inroundrect($mouse.x,$mouse.y,40,1,90,70,10,10) == $true, /window -c @WinText, halt)
  mouse: { if ($inroundrect($mouse.x,$mouse.y,40,1,90,70,10,10) == $true) {
      /drawrect -rfd @WinText $rgb(100,200,100) 1 40 1 90 70 10 10
      /drawrect -rfd @WinText $rgb(110,210,110) 1 40 1 90 40 10 10
      /drawrect -rfd @WinText $rgb(120,220,120) 1 40 1 90 30 10 10
      /drawrect -rfd @WinText $rgb(130,230,130) 1 40 1 90 20 10 10
      /drawtext @WinText 1 Tahoma 14 70 27 Close
    }
    elseif ($inroundrect($mouse.x,$mouse.y,40,1,90,70,10,10) != $true) {
      /drawrect -rfd @WinText $rgb(100,200,200) 1 40 1 90 70 10 10
      /drawrect -rfd @WinText $rgb(110,210,210) 1 40 1 90 40 10 10
      /drawrect -rfd @WinText $rgb(120,220,220) 1 40 1 90 30 10 10
      /drawrect -rfd @WinText $rgb(130,230,230) 1 40 1 90 20 10 10
      /drawtext @WinText 0 Tahoma 14 70 27 Close
    }
  }
  leave: {
    /drawrect -rfd @WinText $rgb(100,200,200) 1 40 1 90 70 10 10
    /drawrect -rfd @WinText $rgb(110,210,210) 1 40 1 90 40 10 10
    /drawrect -rfd @WinText $rgb(120,220,220) 1 40 1 90 30 10 10
    /drawrect -rfd @WinText $rgb(130,230,230) 1 40 1 90 20 10 10
    /drawtext @WinText 0 Tahoma 14 70 27 Close
  }
}
on *:KEYDOWN:@WinText:*: {
  /drawrect -f @WinText 0 1 0 0 20 100
  /drawtext @WinText 1 Tahoma 20 5 40 $keychar
}