generated from mwc/project_drawing
An argument was introduced for the original
function, a new dpad color with its own function and argument was added, and the sizes were adjusted to have both visible at once. As mentioned earlier, I wanted to include an additional dpad to give an almost 3D effect. While I may explore more animation and shadowing in the future, it was certainly a process figuring out proper positioning to get the yellow dpad centered inside of the blue dpad, and it was quite the feeling of success getting there. The only significance to the colors chosen are merely that they are my favorite color combinations. A major lesson that I have learned in this project involves not being ashamed to ask for help or to look up assistance. There are so many resources that exist out there, and I have always had a mindset as a teacher to make everything myself, but when it comes to this type of work, I need to know that most of the proper code for what I want to do already exists, and that I need to simply assemble it the way I choose.
This commit is contained in:
parent
1bf68ab503
commit
23b222fb87
31
drawing.py
31
drawing.py
|
@ -1,12 +1,12 @@
|
|||
# drawing.py
|
||||
# ----------
|
||||
# By ____(you)___________
|
||||
# By Justin Toombs
|
||||
#
|
||||
# (Briefly describe what this program does.)
|
||||
# The beginnings of a directional pad from an old game controller.
|
||||
|
||||
from turtle import *
|
||||
import turtle
|
||||
def dpad():
|
||||
def dpad_blue(size):
|
||||
screen = turtle.Screen()
|
||||
screen.setup(1000,1000)
|
||||
turtle.color('blue')
|
||||
|
@ -15,12 +15,29 @@ def dpad():
|
|||
turtle.down()
|
||||
turtle.begin_fill()
|
||||
for _ in range(4):
|
||||
turtle.fd(300)
|
||||
turtle.fd(size)
|
||||
turtle.right(90)
|
||||
turtle.fd(300)
|
||||
turtle.fd(size)
|
||||
turtle.left(90)
|
||||
turtle.fd(300)
|
||||
turtle.fd(size)
|
||||
turtle.left(90)
|
||||
turtle.end_fill()
|
||||
dpad()
|
||||
def dpad_yellow(size):
|
||||
screen = turtle.Screen()
|
||||
screen.setup(1000,1000)
|
||||
turtle.color('yellow')
|
||||
turtle.up()
|
||||
turtle.goto(-412,-137)
|
||||
turtle.down()
|
||||
turtle.begin_fill()
|
||||
for _ in range(4):
|
||||
turtle.fd(size)
|
||||
turtle.right(90)
|
||||
turtle.fd(size)
|
||||
turtle.left(90)
|
||||
turtle.fd(size)
|
||||
turtle.left(90)
|
||||
turtle.end_fill()
|
||||
dpad_blue(300)
|
||||
dpad_yellow(275)
|
||||
done()
|
Loading…
Reference in New Issue