add VmGUI class to misc.

lets you check if gui was launched by the api
This commit is contained in:
2023-06-29 18:05:07 +01:00
parent b2005030f2
commit 59624ccb3e
2 changed files with 20 additions and 3 deletions

View File

@@ -250,3 +250,19 @@ class Midi:
def _set(self, key: int, velocity: int):
self.cache[key] = velocity
class VmGui:
_launched = None
@property
def launched(self) -> bool:
return self._launched
@launched.setter
def launched(self, val: bool):
self._launched = val
@property
def launched_by_api(self):
return not self.launched