Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GraphicsWindow.Show()
- GraphicsWindow.Height=600
- GraphicsWindow.Width=800
- GraphicsWindow.CanResize="FALSE"
- '+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+='
- GraphicsWindow.BackgroundColor="#a5a5a5"
- GraphicsWindow.PenColor="Black"
- GraphicsWindow.DrawRectangle(1, 1, 400, 400)
- '+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+='
- CursorX = 0
- CursorY = 0
- Colour = "Black"
- '+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+='
- GraphicsWindow.BrushColor="Blue"
- GraphicsWindow.FillRectangle(450, 100, 20, 20)
- GraphicsWindow.FillRectangle(480, 100, 20, 20)
- GraphicsWindow.FillRectangle(510, 100, 20, 20)
- GraphicsWindow.FillRectangle(540, 100, 20, 20)
- GraphicsWindow.BrushColor="Black"
- GraphicsWindow.FillTriangle(460, 70, 450, 90, 470, 90)
- GraphicsWindow.FillTriangle(490, 90, 480, 70, 500, 70)
- GraphicsWindow.FillTriangle(540, 90, 540, 70, 560, 80)
- GraphicsWindow.FillTriangle(530, 90, 530, 70, 510, 80)
- GraphicsWindow.BrushColor="Blue"
- GraphicsWindow.FillRectangle(480, 140, 20, 20)
- GraphicsWindow.FillRectangle(510, 140, 20, 20)
- GraphicsWindow.BrushColor="Black"
- GraphicsWindow.FillRectangle(480, 130, 14, 5)
- GraphicsWindow.FillTriangle(495, 130, 495, 135, 500, 132.5)
- GraphicsWindow.FillRectangle(510, 125, 14, 10)
- GraphicsWindow.FillRectangle(525, 125, 5, 10)
- GraphicsWindow.BrushColor="#000000"
- GraphicsWindow.PenColor="#000000"
- GraphicsWindow.FillRectangle(450, 200, 20, 20)
- GraphicsWindow.BrushColor="#282828"
- GraphicsWindow.PenColor="#282828"
- GraphicsWindow.FillRectangle(480, 200, 20, 20)
- GraphicsWindow.BrushColor="#757575"
- GraphicsWindow.PenColor="#757575"
- GraphicsWindow.FillRectangle(510, 200, 20, 20)
- GraphicsWindow.BrushColor="#ffffff"
- GraphicsWindow.PenColor="#ffffff"
- GraphicsWindow.FillRectangle(540, 200, 20, 20)
- GraphicsWindow.BrushColor="#ff0000"
- GraphicsWindow.PenColor="#ff0000"
- GraphicsWindow.FillRectangle(450, 230, 20, 20)
- GraphicsWindow.BrushColor="#ff7700"
- GraphicsWindow.PenColor="#ff7700"
- GraphicsWindow.FillRectangle(480, 230, 20, 20)
- GraphicsWindow.BrushColor="#ffff00"
- GraphicsWindow.PenColor="#ffff00"
- GraphicsWindow.FillRectangle(510, 230, 20, 20)
- GraphicsWindow.BrushColor="#00ff00"
- GraphicsWindow.PenColor="#00ff00"
- GraphicsWindow.FillRectangle(540, 230, 20, 20)
- GraphicsWindow.BrushColor="#c92020"
- GraphicsWindow.PenColor="#c92020"
- GraphicsWindow.FillRectangle(450, 260, 20, 20)
- GraphicsWindow.BrushColor="#db6900"
- GraphicsWindow.PenColor="#db6900"
- GraphicsWindow.FillRectangle(480, 260, 20, 20)
- GraphicsWindow.BrushColor="#dbab00"
- GraphicsWindow.PenColor="#dbab00"
- GraphicsWindow.FillRectangle(510, 260, 20, 20)
- GraphicsWindow.BrushColor="#09b72e"
- GraphicsWindow.PenColor="#09b72e"
- GraphicsWindow.FillRectangle(540, 260, 20, 20)
- GraphicsWindow.BrushColor="#45e3ef"
- GraphicsWindow.PenColor="#45e3ef"
- GraphicsWindow.FillRectangle(450, 290, 20, 20)
- GraphicsWindow.BrushColor="#4586ef"
- GraphicsWindow.PenColor="#4586ef"
- GraphicsWindow.FillRectangle(480, 290, 20, 20)
- GraphicsWindow.BrushColor="#c034f9"
- GraphicsWindow.PenColor="#c034f9"
- GraphicsWindow.FillRectangle(510, 290, 20, 20)
- GraphicsWindow.BrushColor="#ef45d5"
- GraphicsWindow.PenColor="#ef45d5"
- GraphicsWindow.FillRectangle(540, 290, 20, 20)
- GraphicsWindow.BrushColor="#189999"
- GraphicsWindow.PenColor="#189999"
- GraphicsWindow.FillRectangle(450, 320, 20, 20)
- GraphicsWindow.BrushColor="#1d29ad"
- GraphicsWindow.PenColor="#1d29ad"
- GraphicsWindow.FillRectangle(480, 320, 20, 20)
- GraphicsWindow.BrushColor="#aa0f90"
- GraphicsWindow.PenColor="#aa0f90"
- GraphicsWindow.FillRectangle(510, 320, 20, 20)
- GraphicsWindow.BrushColor="#691291"
- GraphicsWindow.PenColor="#691291"
- GraphicsWindow.FillRectangle(540, 320, 20, 20)
- GraphicsWindow.BrushColor="Blue"
- GraphicsWindow.PenColor="Blue"
- GraphicsWindow.FillRectangle(20, 440, 20, 20)
- GraphicsWindow.FillRectangle(50, 440, 20, 20)
- GraphicsWindow.BrushColor="#000000"
- GraphicsWindow.PenColor="#000000"
- GraphicsWindow.FillRectangle(25, 423, 10, 15)
- GraphicsWindow.FillTriangle(30, 414, 22.5, 423, 37.5, 423)
- GraphicsWindow.FillRectangle(55, 414, 10, 15)
- GraphicsWindow.FillTriangle(60, 438, 52.5, 429, 67.5, 429)
- GraphicsWindow.BrushColor="Blue"
- GraphicsWindow.FillRectangle(600, 260, 20, 20)
- GraphicsWindow.FillRectangle(630, 260, 20, 20)
- GraphicsWindow.BrushColor="Black"
- GraphicsWindow.FillRectangle(602.5, 240, 15, 15)
- GraphicsWindow.FillRectangle(632.5, 240, 15, 15)
- GraphicsWindow.PenColor="White"
- GraphicsWindow.DrawLine(632.5, 255, 647.5, 240)
- GraphicsWindow.BrushColor="Blue"
- GraphicsWindow.PenColor="Blue"
- GraphicsWindow.FillRectangle(750, 550, 19, 19)
- GraphicsWindow.BrushColor="Black"
- GraphicsWindow.PenColor="Black"
- GraphicsWindow.FillRectangle(750, 530, 9, 9)
- GraphicsWindow.FillRectangle(761, 530, 9, 9)
- GraphicsWindow.FillRectangle(750, 540, 9, 9)
- GraphicsWindow.FillRectangle(761, 540, 9, 9)
- GraphicsWindow.BrushColor="White"
- GraphicsWindow.PenColor="White"
- GraphicsWindow.DrawLine(750, 530, 769, 550)
- GraphicsWindow.BrushColor="Blue"
- GraphicsWindow.PenColor="Blue"
- GraphicsWindow.FillRectangle(480, 380, 20, 20)
- GraphicsWindow.FillRectangle(510, 380, 20, 20)
- GraphicsWindow.BrushColor="Black"
- GraphicsWindow.PenColor="Black"
- GraphicsWindow.DrawLine(490, 355, 490, 375)
- GraphicsWindow.FillTriangle(490, 355, 498, 360, 490, 365)
- GraphicsWindow.DrawLine(520, 355, 520, 375)
- GraphicsWindow.FillTriangle(520, 355, 512, 360, 520, 365)
- '+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+='
- GraphicsWindow.BrushColor="Blue"
- GraphicsWindow.PenColor="Black"
- hover = Shapes.AddRectangle(20, 20)
- Shapes.Move(hover, 1000, 1000)
- GraphicsWindow.BrushColor="#a5a5a5"
- GraphicsWindow.PenColor="Red"
- cursor = Shapes.AddRectangle(10, 10)
- Shapes.Move(cursor, CursorX*40+1, CursorY*40+1)
- '+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+='
- GraphicsWindow.MouseDown = OnMouseDown
- GraphicsWindow.KeyDown = OnKeyDown
- '+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+='
- Sub OnMouseDown
- MouseX = GraphicsWindow.MouseX
- MouseY = GraphicsWindow.MouseY
- If MouseX > 450 And MouseX < 470 And MouseY > 100 And MouseY < 120 Then
- If CursorY <> 0 Then
- CursorY = CursorY-1
- EndIf
- Else
- If MouseX > 480 And MouseX < 500 And MouseY > 100 And MouseY < 120 Then
- If CursorY <> 19 Then
- CursorY = CursorY+1
- EndIf
- Else
- If MouseX > 510 And MouseX < 530 And MouseY > 100 And MouseY < 120 Then
- If CursorX <> 0 Then
- CursorX = CursorX-1
- EndIf
- Else
- If MouseX > 540 And MouseX < 570 And MouseY > 100 And MouseY < 120 Then
- If CursorX <> 19 Then
- CursorX = CursorX+1
- EndIf
- Else
- If MouseX > 480 And MouseX < 510 And MouseY > 140 And MouseY < 160 Then
- GraphicsWindow.BrushColor=Colour
- GraphicsWindow.PenColor=Colour
- Shapes.Remove(rectangle[CursorX][CursorY])
- rectangle[CursorX][CursorY] = Shapes.AddRectangle(10,10)
- Shapes.Move(rectangle[CursorX][CursorY], CursorX*10+1, CursorY*10+1)
- Else
- If MouseX > 510 And MouseX < 530 And MouseY > 140 And MouseY < 160 Then
- Shapes.Remove(rectangle[CursorX][CursorY])
- ElseIf MouseX > 450 And MouseX < 470 And MouseY > 200 And MouseY < 220 Then
- Colour = "#000000"
- ElseIf MouseX > 480 And MouseX < 500 And MouseY > 200 And MouseY < 220 Then
- Colour = "#282828"
- ElseIf MouseX > 510 And MouseX < 530 And MouseY > 200 And MouseY < 220 Then
- Colour = "#757575"
- ElseIf MouseX > 540 And MouseX < 560 And MouseY > 200 And MouseY < 220 Then
- Colour = "#ffffff"
- ElseIf MouseX > 450 And MouseX < 470 And MouseY > 230 And MouseY < 250 Then
- Colour = "#ff0000"
- ElseIf MouseX > 480 And MouseX < 500 And MouseY > 230 And MouseY < 250 Then
- Colour = "#ff7700"
- ElseIf MouseX > 510 And MouseX < 530 And MouseY > 230 And MouseY < 250 Then
- Colour = "#ffff00"
- ElseIf MouseX > 540 And MouseX < 560 And MouseY > 230 And MouseY < 250 Then
- Colour = "#00ff00"
- ElseIf MouseX > 450 And MouseX < 470 And MouseY > 260 And MouseY < 280 Then
- Colour = "#c92020"
- ElseIf MouseX > 480 And MouseX < 500 And MouseY > 260 And MouseY < 280 Then
- Colour = "#db6900"
- ElseIf MouseX > 510 And MouseX < 530 And MouseY > 260 And MouseY < 280 Then
- Colour = "#dbab00"
- ElseIf MouseX > 540 And MouseX < 560 And MouseY > 260 And MouseY < 280 Then
- Colour = "#09b72e"
- ElseIf MouseX > 450 And MouseX < 470 And MouseY > 290 And MouseY < 310 Then
- Colour = "#45e3ef"
- ElseIf MouseX > 480 And MouseX < 500 And MouseY > 290 And MouseY < 310 Then
- Colour = "#4586ef"
- ElseIf MouseX > 510 And MouseX < 530 And MouseY > 290 And MouseY < 310 Then
- Colour = "#c034f9"
- ElseIf MouseX > 540 And MouseX < 560 And MouseY > 290 And MouseY < 310 Then
- Colour = "#ef45d5"
- ElseIf MouseX > 450 And MouseX < 470 And MouseY > 320 And MouseY < 340 Then
- Colour = "#189999"
- ElseIf MouseX > 480 And MouseX < 500 And MouseY > 320 And MouseY < 340 Then
- Colour = "#1d29ad"
- ElseIf MouseX > 510 And MouseX < 530 And MouseY > 320 And MouseY < 340 Then
- Colour = "#aa0f90"
- ElseIf MouseX > 540 And MouseX < 560 And MouseY > 320 And MouseY < 340 Then
- Colour = "#691291"
- ElseIf MouseX > 480 And MouseX < 500 And MouseY > 380 And MouseY < 400 Then
- GraphicsWindow.BrushColor="Black"
- GraphicsWindow.PenColor="Black"
- Shapes.Remove(start)
- start = Shapes.AddTriangle(CursorX*10+1, CursorY*10+1, CursorX*10+11, CursorY*10+6, CursorX*10+1, CursorY*10+11)
- ElseIf MouseX > 510 And MouseX < 530 And MouseY > 380 And MouseY < 400 Then
- GraphicsWindow.BrushColor="Black"
- GraphicsWindow.PenColor="Black"
- Shapes.Remove(remove)
- remove = Shapes.AddTriangle(CursorX*10+11, CursorY*10+1, CursorX*10+1, CursorY*10+6, CursorX*10+11, CursorY*10+11)
- ElseIf MouseX > 750 And MouseX < 769 And MouseY > 550 And MouseY < 569 Then
- For y = 1 To 40
- For z = 1 To 40
- Shapes.Remove(rectangle[y-1][z-1])
- EndFor
- EndFor
- ElseIf MouseX > 600 And MouseX < 620 And MouseY > 260 And MouseY < 280 Then
- If Colour <> "#000000" And Colour <> "Black" Then
- GraphicsWindow.BackgroundColor = Colour
- EndIf
- ElseIf MouseX > 630 And MouseX < 650 And MouseY > 260 And MouseY < 280 Then
- GraphicsWindow.BackgroundColor = "#a5a5a5"
- ElseIf MouseX > 20 And MouseX < 40 And MouseY > 440 And MouseY < 460 Then
- TextWindow.WriteLine("Copy this code into a .txt file to share and save!")
- For x = 1 to 40
- For i = 1 to 40
- If Shapes.GetTop(rectangle[x-1][i-1]) <> 0 Then
- TextWindow.Write("1")
- Else
- TextWindow.Write("0")
- EndIf
- EndFor
- EndFor
- TextWindow.Pause()
- TextWindow.Hide()
- ElseIf MouseX > 50 And MouseX < 70 And MouseY > 440 And MouseY < 460 Then
- TextWindow.Clear()
- TextWindow.Show()
- TextWindow.WriteLine("Copy the file directory of the txt file with the code:")
- TextToReplace = TextWindow.Read()
- Code = File.ReadContents(TextToReplace)
- TextWindow.Hide()
- For y = 1 To 40
- For z = 1 To 40 'iterate through each character of string
- character[((y-1)*40)+z] = Text.GetSubText(Code, ((y-1)*40)+z, 1)
- Shapes.Remove(rectangle[y-1][z-1])
- If character[((y-1)*40)+z] = "1" Then
- GraphicsWindow.BrushColor="Black"
- GraphicsWindow.PenColor="Black"
- rectangle[y-1][z-1] = Shapes.AddRectangle(10, 10)
- Shapes.Move(rectangle[y-1][z-1], (y-1)*10+1, (z-1)*10+1)
- EndIf
- EndFor
- EndFor
- EndIf
- EndIf
- EndIf
- EndIf
- EndIf
- EndIf
- Shapes.Move(cursor, CursorX*10+1, CursorY*10+1)
- EndSub
- Sub OnKeyDown
- If GraphicsWindow.LastKey = "A" Or GraphicsWindow.LastKey = "Left" Then
- If CursorX <> 0 Then
- CursorX = CursorX-1
- EndIf
- ElseIf GraphicsWindow.LastKey = "S" Or GraphicsWindow.LastKey = "Down" Then
- If CursorY <> 39 Then
- CursorY = CursorY+1
- EndIf
- ElseIf GraphicsWindow.LastKey = "D" Or GraphicsWindow.LastKey = "Right" Then
- If CursorX <> 39 Then
- CursorX = CursorX+1
- EndIf
- ElseIf GraphicsWindow.LastKey = "W" Or GraphicsWindow.LastKey = "Up" Then
- If CursorY <> 0 Then
- CursorY = CursorY-1
- EndIf
- ElseIf GraphicsWindow.LastKey = "Return" Then
- GraphicsWindow.BrushColor=Colour
- GraphicsWindow.PenColor=Colour
- Shapes.Remove(rectangle[CursorX][CursorY])
- rectangle[CursorX][CursorY] = Shapes.AddRectangle(10,10)
- Shapes.Move(rectangle[CursorX][CursorY], CursorX*10+1, CursorY*10+1)
- ElseIf GraphicsWindow.LastKey = "Back" Then
- Shapes.Remove(rectangle[CursorX][CursorY])
- EndIf
- Shapes.Move(cursor, CursorX*10+1, CursorY*10+1)
- EndSub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement