aboutsummaryrefslogtreecommitdiffstats
path: root/solo_tool.py
diff options
context:
space:
mode:
Diffstat (limited to 'solo_tool.py')
-rw-r--r--solo_tool.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/solo_tool.py b/solo_tool.py
index 4ea081d..6cb1a77 100644
--- a/solo_tool.py
+++ b/solo_tool.py
@@ -74,7 +74,14 @@ class SoloTool:
return list()
def setAbLimitEnable(self, enable):
+ previous = self._abController.isEnabled()
self._abController.setEnable(enable)
+ new = self._abController.isEnabled()
+ if previous != new:
+ self._notifier.notify(Notifier.AB_LIMIT_ENABLED_EVENT, new)
+
+ def isAbLimitEnabled(self):
+ return self._abController.isEnabled()
def nextStoredAbLimits(self):
previous = self._abController.getLoadedIndex()
@@ -152,3 +159,6 @@ class SoloTool:
def registerCurrentAbLimitsCallback(self, callback):
self._notifier.registerCallback(Notifier.CURRENT_AB_EVENT, callback)
+ def registerAbLimitEnabledCallback(self, callback):
+ self._notifier.registerCallback(Notifier.AB_LIMIT_ENABLED_EVENT, callback)
+