Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add some lines
  • Loading branch information
DigiDuncan committed Dec 29, 2025
commit cc9ee96f95fe1f765bb475e8500d088f53cc6f58
13 changes: 13 additions & 0 deletions arcade/examples/easing_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,18 @@ def __init__(self):
self.sprites.append(sprite)
self.spritelist.append(sprite)

self.lines = []
for a in self.areas:
y = a.bottom + (a.height * 0.75)
# Long line
self.lines.extend([(a.left, y), (a.right, y)])
# Left line
self.lines.extend([(a.left, y - buffer), (a.left, y + buffer)])
# Center line
self.lines.extend([(a.center_x, y - buffer), (a.center_x, y + buffer)])
# Right line
self.lines.extend([(a.right, y - buffer), (a.right, y + buffer)])

def idx_to_func_name(self, i: int) -> str:
if i >= len(self.areas):
raise ValueError
Expand Down Expand Up @@ -220,6 +232,7 @@ def on_draw(self):
self.subtitle_text.draw()
for n, r in enumerate(self.areas):
arcade.draw_rect_filled(r, arcade.color.BLACK.replace(a=64))
arcade.draw_lines(self.lines, arcade.color.WHITE, 2)
self.text_batch.draw()
self.spritelist.draw()

Expand Down
Loading