Skip to content

Commit 23928b2

Browse files
authored
Update main.py
Changed when the cards show up (so they are being presented at all times) and then also centered the response box
1 parent 1dea8d3 commit 23928b2

File tree

1 file changed

+30
-15
lines changed

1 file changed

+30
-15
lines changed

tasks/AssBind/main.py

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,21 @@ def AssBindExp(self, config, sub_dir, task_dir=None, block=0,
120120
top=new_rem.bottom,
121121
center_x=self.exp.screen.center_x + s(50),
122122
color="black")
123+
# adding in a border around the image to make them look like cards (more gamelike)
124+
left_border = Image(source=Ref(os.path.join, config.TASK_DIR, "playing_card.png"),
125+
width=(s(config.IMG_WIDTH) + s(50)),
126+
height=(s(config.IMG_HEIGHT) + s(50)),
127+
blocking=False,
128+
allow_stretch=True,
129+
right=self.exp.screen.center_x - s(5),
130+
keep_ratio=False)
131+
right_border = Image(source=Ref(os.path.join, config.TASK_DIR, "playing_card.png"),
132+
width=(s(config.IMG_WIDTH) + s(50)),
133+
height=(s(config.IMG_HEIGHT) + s(50)),
134+
blocking=False,
135+
allow_stretch=True,
136+
left=left_border.right + s(10),
137+
keep_ratio=False)
123138
with UntilDone():
124139
# allows people time to orient
125140
Wait(1)
@@ -138,25 +153,25 @@ def AssBindExp(self, config, sub_dir, task_dir=None, block=0,
138153

139154
with Parallel():
140155
# adding in a border around the image to make them look like cards (more gamelike)
141-
left_border = Image(source=Ref(os.path.join, config.TASK_DIR, "playing_card.png"),
142-
width=(s(config.IMG_WIDTH) + s(50)),
143-
height=(s(config.IMG_HEIGHT) + s(50)),
144-
blocking=False,
145-
allow_stretch=True,
146-
right=self.exp.screen.center_x - s(5),
147-
keep_ratio=False)
148-
right_border = Image(source=Ref(os.path.join, config.TASK_DIR, "playing_card.png"),
149-
width=(s(config.IMG_WIDTH) + s(50)),
150-
height=(s(config.IMG_HEIGHT) + s(50)),
151-
blocking=False,
152-
allow_stretch=True,
153-
left=left_border.right + s(10),
154-
keep_ratio=False)
156+
# left_border = Image(source=Ref(os.path.join, config.TASK_DIR, "playing_card.png"),
157+
# width=(s(config.IMG_WIDTH) + s(50)),
158+
# height=(s(config.IMG_HEIGHT) + s(50)),
159+
# blocking=False,
160+
# allow_stretch=True,
161+
# right=self.exp.screen.center_x - s(5),
162+
# keep_ratio=False)
163+
# right_border = Image(source=Ref(os.path.join, config.TASK_DIR, "playing_card.png"),
164+
# width=(s(config.IMG_WIDTH) + s(50)),
165+
# height=(s(config.IMG_HEIGHT) + s(50)),
166+
# blocking=False,
167+
# allow_stretch=True,
168+
# left=left_border.right + s(10),
169+
# keep_ratio=False)
155170
# initialize a frame around the images
156171
# (which is invisible until response)
157172
self.width = right_border.right - left_border.left
158173
self.height = right_border.top - right_border.bottom
159-
resp_rect = Rectangle(width = self.width, center_x = self.exp.screen.center_x - s(25/2),
174+
resp_rect = Rectangle(width = self.width, center_x = self.exp.screen.center_x,
160175
top = left_border.top, height = self.height,
161176
color=(.35, .35, .35, 0.0),
162177
duration=config.STIM_PRES_TIME)

0 commit comments

Comments
 (0)