------------Cazomino05------------
------------Altscripts------------
------------Dialog----------------
------------By:Cazomino05---------
------------for: Paint compatiton-
------------Ways of opening: menu-
dialog Tool's {
title "Tool's"
size 2 171 414 43
option dbu
text "Color", 2, 7 15 16 8
combo 1, 35 12 47 50, size drop
text "Brush size", 3, 6 27 25 8
edit "", 4, 35 25 35 10, limit 2 center
radio "Fill with colour", 8, 134 22 36 10, push
radio "Brush", 9, 97 22 36 10, push
box "Color,Brush Size", 5, 2 0 84 41
box "Drawing Options", 6, 90 0 195 42
radio "Spider", 7, 134 10 36 10, push
radio "Pen", 10, 97 10 36 10, push
button "Open", 11, 374 6 34 10
button "Save As", 12, 374 18 34 10
box "Options", 13, 299 -1 113 43
radio "Line", 18, 171 22 36 10, push
radio "Polygon", 19, 171 10 36 10, push
radio "Text box", 17, 208 10 36 10, push
button "New", 20, 337 18 34 10
radio "copy colour", 21, 208 22 36 10, push
radio "Circles", 23, 244 22 36 10, push
button "Help", 25, 364 30 34 10
radio "square", 22, 244 10 36 10, push
radio "Rotate 90", 14, 303 6 34 10, push
radio "Rotate 270", 15, 338 6 34 10, push
radio "Rotate 180", 16, 303 18 34 10, push
button "Reset Line", 26, 313 30 34 10
}
on *:dialog:tool's:init:* {
/did -a tool's 4 5
/did -c tool's 10
/did -a tool's 1 Indigo
/did -a tool's 1 Aquamarine
/did -a tool's 1 Gold
/did -a tool's 1 Blue/Violet
/did -a tool's 1 Dark red
/did -a tool's 1 Silver
/did -a tool's 1 Yellow
/did -a tool's 1 Red
/did -a tool's 1 Green
/did -a tool's 1 Blue
/did -a tool's 1 Pink
/did -a tool's 1 Purple
/did -a tool's 1 Black
/did -a tool's 1 Cornsilk
/did -a tool's 1 Orange
/did -a tool's 1 White
/did -a tool's 1 Custom
}
on *:DIALOG:Tool's:Edit:4:{ /set %size $did(4) }
on *:DIALOG:Tool's:Sclick:20:{ /window -c @Altscripts_Paint | /window -p +l @Altscripts_Paint }
on *:DIALOG:Tool's:Sclick:1:{
if ($did(1).seltext == White) /set %Colour $rgb(255,255,255)
if ($did(1).seltext == Custom) /dialog -ma Custom Custom
if ($did(1).seltext == Yellow) /set %Colour $rgb(255,255,0)
if ($did(1).seltext == Red) /set %Colour $rgb(255,0,0)
if ($did(1).seltext == Pink) /set %Colour $rgb(255,105,180)
if ($did(1).seltext == Purple) /set %Colour $rgb(128,0,128)
if ($did(1).seltext == Green) /set %Colour $rgb(0,128,0)
if ($did(1).seltext == Cornsilk) /set %Colour $rgb(255,248,220)
if ($did(1).seltext == Blue) /set %Colour $rgb(0,0,255)
if ($did(1).seltext == Black) /set %Colour $rgb(0,0,0)
if ($did(1).seltext == Orange) /set %Colour $rgb(255,69,0)
if ($did(1).seltext == Indigo) /set %Colour $rgb(75,0,130)
if ($did(1).seltext == Aquamarine) /set %Colour $rgb(127,255,212)
if ($did(1).seltext == Gold) /set %Colour $rgb(255,215,0)
if ($did(1).seltext == Blue/Violet) /set %Colour $rgb(138,43,226)
if ($did(1).seltext == Dark red) /set %Colour $rgb(139,0,0)
if ($did(1).seltext == Silver) /set %Colour $rgb(192,192,192)
}
on *:DIALOG:Altscripts_Paint_Help:sclick:3:{ /url http://altscripts.net }
on *:DIALOG:Custom:sclick:6:{
if (%1 <= 255) && (%2 <= 255) && (%3 <= 255) {
/set %colour $rgb( $+ %1 $+ , $+ %2 $+ , $+ %3 $+ ) | /omgicantbeliveitsatest
}
else { /echo -a 7Invalid number please try again with a number from 0 to 255 in each box
}
}
dialog Custom {
title "Custom"
size -1 -1 164 82
option dbu
edit "", 1, 16 27 50 10, limit 3
edit "", 2, 86 27 50 10, limit 3
edit "", 3, 55 49 50 10, limit 3
text "Please enter 3 rgb values for the script", 4, 35 8 98 8
button "Nvm", 5, 21 64 37 12, cancel
button "Go", 6, 87 64 37 12, ok
text "Red", 7, 33 18 25 8
text "Green", 8, 93 18 25 8
text "Blue", 9, 70 41 25 8
}
on *:DIALOG:Custom:Edit:1,2,3:{
if ($did == 1) /set %1 $did(1)
if ($did == 2) /set %2 $did(2)
if ($did == 3) /set %3 $did(3)
}
on *:DIALOG:tool's:sclick:12 {
var %%XoX " $+ $$sfile(*.jpg,Altscripts_Paint,Save) $+ .jpg"
/set %temp-folder-or-w/e $?="Enter a quality from 1-100 60+ recommended?"
if (%XoX != $null) drawsave -q $+ %temp-folder-or-w/e @Altscripts_paint %XoX
}
on *:DIALOG:tool's:sclick:11 {
/set %Temp-folder-or-w/e2 " $+ $$sfile(*.jpg,Select a Picture,open) $+ "
if (%Temp-folder-or-w/e2) {
var %w $pic(%Temp-folder-or-w/e2).width,%h $pic(%Temp-folder-or-w/e2).height
/window -c @Altscripts_paint
/window -p +l @Altscripts_paint
/drawpic @Altscripts_paint 0 0 %Temp-folder-or-w/e2
}
}
alias /omgicantbeliveitsatest {
/window -kdop +l @test 400 200 70 70
/.timer 1 0 /drawfill -ihnr @test %colour %colour 0 0 9000 9000 9000 9000
}
Menu status,Channel,query,Menubar,nicklist {
Altscripts Paint:/dialog -ma Tool's Tool's | /window -p +l @Altscripts_Paint
}
menu @Altscripts_Paint {
sclick {
if ($did(tool's,9).state) { /set %xy 1 }
elseif ($did(tool's,23).state) {
if (%Alt14 == 1) { /drawrect -er @Altscripts_paint %colour $did(tool's,4) %mouse.x %mouse.y $calc($abs($mouse.x - %mouse.x)) $calc($abs($mouse.y - %mouse.y)) | /unset %Alt14 }
else { /set %mouse.x $mouse.x | /set %mouse.y $mouse.y | /set %Alt14 1 }
}
elseif ($did(tool's,22).state) {
if (%Alt12 == 1) { /drawrect -r @Altscripts_paint %colour $did(tool's,4) %mouse.x1 %mouse.y1 $calc($abs($mouse.x - %mouse.x1)) $calc($abs($mouse.y - %mouse.y1)) | /unset %Alt12 }
else { /set %leftclick $mouse.x $mouse.y | /set %Alt12 1 }
}
elseif ($did(tool's,21).state) { /set %Colour $getdot(@Altscripts_Paint, $+ $mouse.x $+ , $+ $mouse.y) }
elseif ($did(tool's,10).state) { /set %xypen 1 }
elseif ($did(tool's,8).state) { /drawfill -r @Altscripts_Paint %colour $did(tool's,4) 300 245 }
elseif ($did(tool's,7).state) {
if (%Alt11 == 1) { /set %x1 $mouse.x $mouse.y | drawline -r @Altscripts_Paint %colour $did(tool's,4) %y1 %x1 }
else { /set %y1 $mouse.x $mouse.y | set %Alt11 1 }
}
elseif ($did(tool's,18).state) {
if (%Alt10 == 1) { /set %x2 $mouse.x $mouse.y | drawline -r @Altscripts_Paint %colour $did(tool's,4) %y2 %x2 | unset %x2 | unset %y2 | unset %Alt10 }
else { /set %y2 $mouse.x $mouse.y | set %Alt10 1 }
}
elseif ($did(tool's,19).state) {
if (%Alt9 == 1) { /set %x3 $mouse.x $mouse.y | drawline -r @Altscripts_paint %colour $did(tool's,4) %x3 %y2 | set %x3 %y2 | set %y2 $mouse.x $mouse.y }
else { /set %y2 $mouse.x $mouse.y | set %Alt9 1 }
}
elseif ($did(tool's,17).state) {
/set %things-i-need $mouse.x $mouse.y
/dialog -ma Font Font
}
}
mouse {
if (%xy) {
/drawdot -r @Altscripts_Paint %colour $did(tool's,4) $mouse.x $mouse.y $mouse.x $mouse.y
}
elseif (%xypen) {
/drawdot -r @Altscripts_Paint %colour $did(tool's,4) $mouse.x $mouse.y $mouse.x $mouse.y
}
else { /unset %xy* }
}
drop { /unset %xy* }
}
on *:DIALOG:Font:init:*:{
/did -a Font 3 Underlined-
/did -a Font 3 Bold-
/did -a Font 3 Bold & Underlined
/did -a Font 3 None.
did -a Font 2 Verdana
did -a Font 2 Tahoma
did -a Font 2 FixedSys
did -a Font 2 Courier
did -a Font 2 Impact
did -a Font 3 Comic Sans MS
}
dialog Font {
title "Font"
size -1 -1 155 91
option dbu
box "Select font properties", 1, 3 2 149 87
combo 2, 12 33 60 50, sort size drop
combo 3, 78 32 60 50, sort size drop
text "Font type", 4, 27 18 25 8
text "Font Extra's", 5, 93 17 31 8
}
On *:DIALOG:Font:Close:*:{ /set %extra's $did(Font,3)
/set %Font $did(Font,2)
/drawtext -pr @Altscripts_Paint %colour %Font %size %things-i-need $extra's $+ $?="Enter text:"
}
alias -l extra's {
if (%extra's == Bold & Underlined) return
if (%extra's == Underlined-) return
if (%extra's == Bold-) return
else { Return }
}
dialog Altscripts_Paint_help {
title "Altscripts_Paint_help"
size -1 -1 229 130
option dbu
combo 1, 10 46 64 78, size
text "Click a button or type the name of the button in the combo box located next to this text and this text will change to the help for that part of paint", 2, 82 44 136 44
button "Ok", 4, 79 95 66 11, ok cancel
button "Reset text area to help", 6, 151 95 66 11
icon 3, 0 0 227 40
}
alias /help-meh { if ($isfile(Altscripts-Paint-gif.gif) == $true) { /did -g Altscripts_Paint_help 3 Altscripts-Paint-gif.gif }
else { /echo halt }
}
on *:DIALOG:Altscripts_Paint_help:init:*:{
/did -a Altscripts_Paint_help 1 Pen
/did -a Altscripts_Paint_help 1 Polygon
/did -a Altscripts_Paint_help 1 Textbox
/did -a Altscripts_Paint_help 1 Square
/did -a Altscripts_Paint_help 1 Fill with colour
/did -a Altscripts_Paint_help 1 Copy Colour
/did -a Altscripts_Paint_help 1 Circles
/did -a Altscripts_Paint_help 1 Brush
/did -a Altscripts_Paint_help 1 Line
/did -a Altscripts_Paint_help 1 Reset Line
}
on *:DIALOG:tool's:Sclick:25:{ /dialog -ma Altscripts_Paint_help Altscripts_Paint_help | /help-meh }
on *:DIALOG:tool's:Sclick:26:{ /unset %Alt9 %Alt11 | /unset %y2 %x2 %x3 %y3 %y1 %x1 }
on *:DIALOG:Altscripts_Paint_help:Sclick:6:{ /did -a Altscripts_Paint_help 2 Click a button or type the name of the button in the combo box located next to this text and this text will change to the help for that part of paint }
on *:DIALOG:Altscripts_Paint_help:Sclick:1:{
if ($did(1).seltext == Line) /did -a Altscripts_Paint_help 2 This tool aids in drawing lines you give it two points 1) the point to start 2) the point where u want the line to end and a line is created with the given width and colour in the Color,Brush Size group box.
if ($did(1).seltext == Fill with colour) /did -a Altscripts_Paint_help 2 Fill tool im sure uve come across a tool that fills the whole window with a certain colour before but if you havent heres more infomation... This tool makes the background the specified Color in the Color,Brush Size group box.
if ($did(1).seltext == Copy Colour) /did -a Altscripts_Paint_help 2 Right The copy colour tool, ive named this tool the Copy Colour tool mainly becuase its a good name for its job, Description: This tool copys the colour at the exact point you click when its selected this does not change the Color,Brush Size group box unfortunatly.
if ($did(1).seltext == Circles) /did -a Altscripts_Paint_help 2 Circle's an easy one one point to start second point to finish uses the color and brush size from the Color,Brush Size group box.
if ($did(1).seltext == Square) /did -a Altscripts_Paint_help 2 Square Generates a square in the specified positions 1) and 2) with the options from the Color,Brush Size group box.
if ($did(1).seltext == Brush) /did -a Altscripts_Paint_help 2 Basicly a pen tool while you hold down your mouse it draws a dot where your cursor is in the colors/ Brush size from the Color,Brush Size group box.
if ($did(1).seltext == Pen) /did -a Altscripts_Paint_help 2 Basicly same as brush tool but uses a specified size for the drawing color is still taken from in the Color,Brush Size group box.
if ($did(1).seltext == Polygon) /did -a Altscripts_Paint_help 2 Polygon now its getting interesting This draws more than one line from the last given point will turn off after you de select the option uses the colour and Brush size in the Color,Brush Size group box.
if ($did(1).seltext == Textbox) /did -a Altscripts_Paint_help 2 Text box this is a Text tool can do underlining and has a choice of font you input the text after selecting an option then it add's it where you clicked.
if ($did(1).seltext == Reset Line) /did -a Altscripts_Paint_help 2 This resets the Spider and Polygon tool's for re-use.
}
on *:DIALOG:Tool's:Sclick:14:{ /drawrot -f @Altscripts_paint 90 }
on *:DIALOG:Tool's:Close:*:{ /window -c @Altscripts_Paint }
on *:DIALOG:Tool's:Sclick:15:{ /drawrot -f @Altscripts_paint 270 }
on *:DIALOG:Tool's:sclick:16:{ /drawrot -f @Altscripts_paint 180 }