Skip to content

Commit 8e6c409

Browse files
committed
NF: add option of star to builder shape component
1 parent 0694027 commit 8e6c409

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

psychopy/experiment/components/polygon/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def __init__(self, exp, parentName, name='polygon', interpolate='linear',
7575
"can set number of vertices")
7676
self.params['shape'] = Param(
7777
shape, valType='str',
78-
allowedVals=["line", "triangle", "rectangle", "cross",
78+
allowedVals=["line", "triangle", "rectangle", "cross", "star",
7979
"regular polygon..."],
8080
updates='constant',
8181
allowedUpdates=['constant'],
@@ -180,7 +180,7 @@ def writeInitCode(self, buff):
180180
" width=%(size)s[0], height=%(size)s[1],\n" % inits)
181181
elif vertices in ['star']:
182182
code = ("%s = visual.ShapeStim(\n" % inits['name'] +
183-
" win=win, name='%s', vertices='star',%s\n" % (inits['name'], unitsStr) +
183+
" win=win, name='%s', vertices='star7',%s\n" % (inits['name'], unitsStr) +
184184
" size=%(size)s,\n" % inits)
185185
elif vertices in ['cross']:
186186
code = ("%s = visual.ShapeStim(\n" % inits['name'] +
@@ -221,4 +221,4 @@ def writeInitCodeJS(self, buff):
221221
pos=self.params['pos'],
222222
size=self.params['size'],
223223
lineColor=self.params['lineColor'],
224-
fillColor=self.params['fillColor']))
224+
fillColor=self.params['fillColor']))

0 commit comments

Comments
 (0)