Well i created my very first picture window 8)
They are hard, with turning and stuff, i dont have that this one is easy tbh :$ . also my first try with $mouse
ah well a little pic:
edit; a piece of the dialog fell out, and ya kno the pic is 1337! dont be mean against my uber smily.
needed to remvoe pic :(
menu * {
Paint for mirc: { /window -pk0 +ftxn @Paint
/clear @Paint
/dialog -m paint paint
}
}
on *:close:@paint:{
/dialog -x paint paint
}
dialog Paint {
title "Paint"
size 905 225 60 150
option dbu
radio "Lines", 1, 3 11 50 10
edit "Size", 2, 2 92 16 10
edit "Color 1-15", 3, 23 92 32 10
radio "Draw a dot.", 4, 3 25 50 10
radio "Draw Rectangle", 5, 3 39 50 10
radio "Draw Ellipse", 6, 3 52 50 10
radio "Drawtext", 7, 3 66 50 10
edit "Text;", 8, 4 79 50 10, multi vsbar
box "Radio boxes", 9, 1 3 55 108
button "Clear.", 10, 8 113 37 12
button "Quit.", 11, 8 128 37 12, cancel
}
on *:dialog:paint:sclick:10:{
/clear @Paint
}
on *:dialog:paint:sclick:11:{
/window -c @Paint
}
menu @Paint {
sclick: { set %mouse.x $mouse.x
set %mouse.y $mouse.y }
uclick:{
if ($did(paint,3) isnum 1-15) && ($did(paint,2) isnum) {
if ($did(Paint,1).state) { /drawline -h @Paint $did(paint,3) $did(paint,2) %mouse.x %mouse.y $mouse.x $mouse.y }
if ($did(Paint,4).state) { /drawdot -h @Paint $did(paint,3) $did(paint,2) %mouse.x %mouse.y $mouse.x $mouse.y }
if ($did(Paint,5).state) { /drawrect -h @Paint $did(paint,3) $did(paint,2) %mouse.x %mouse.y $mouse.x $mouse.y }
if ($did(Paint,6).state) { /drawrect -eh @Paint $did(paint,3) $did(paint,2) %mouse.x %mouse.y $mouse.x $mouse.y }
if ($did(Paint,7).state) { /drawtext -h @Paint $did(paint,3) %mouse.x %mouse.y $did(paint,8) }
}
if ($did(paint,3) !isnum 1-15) || ($did(paint,2) !isnum) {
/did -ra paint 8 Size+Color }
}
}