Define prestart attribute on ButtonMark to place buttons before start

This commit is contained in:
2025-08-23 00:33:54 +01:00
parent b8d8cb8fb7
commit 5a25e325f3
4 changed files with 25 additions and 5 deletions

View File

@@ -178,12 +178,13 @@ class SetMark(Event):
pass
class ButtonMark(Event):
def __init__(self, name, *args, **kwargs):
def __init__(self, name, prestart=False, *args, **kwargs):
super().__init__(*args, **kwargs)
self._name = name
self._prestart = prestart
def prepare(self):
self._at._timings.register_mark(self._name, None)
self._at._timings.register_mark(self._name, None, self._prestart)
def start(self):
self._eventrunner.finished(self)