def volumeDown(self): self._enable() if self.muteState: self.muteState = False self.value = includes.clipInt(self.value - self.incVal, 0, 100)
def right(self, args): '''Logic to select next OSD element to the right from currently selected item''' if not self.isVisible: self.enable(None) self.wId = 0 self.widgets[self.wId].enable(None) return self._resetCnt() if self.wId < len(self.widgets): self.widgets[self.wId].disable(None) self.wId = includes.clipInt(self.wId + 1, min=0, max=4) self.widgets[self.wId].enable(None)
def _removeDialog(self, dialogId): if len(self.dialogList) <= 0: logging.info("removeDialog: dialog list is empty") return widget = self.dialogList.pop(dialogId) self._updateView() for item in self.dialogList: item.disable(None) self.wId = includes.clipInt(self.wId - 1, 0, len(self.dialogList)-1) if len(self.dialogList) > 0: self.dialogList[self.wId].enable(None)
def enable(self, args): if len(self.dialogList) == 0: logging.info("THomas: dailog list is 0 = {}".format(self.wId)) return True if self.wId < 0: self.wId = 0 self.dialogList[self.wId].enable(args) elif self.wId >= 0 and self.wId < len(self.dialogList): self.dialogList[self.wId].disable(args) self.wId = self.wId + 1 self.wId = includes.clipInt(self.wId, 0, len(self.dialogList)-1) self.dialogList[self.wId].enable(args) return False
def disable(self, args): logging.info("THomas: disable wId = {}".format(self.wId)) if self.wId >= 0 and self.wId < len(self.dialogList): self.dialogList[self.wId].disable(args) self.wId = self.wId - 1 self.wId = includes.clipInt(self.wId, -1, len(self.dialogList)-1) if self.wId >= 0: self.dialogList[self.wId].enable(args) logging.info("THomas: disable wId 2 = {}".format(self.wId)) if self.wId < 0 or len(self.dialogList) == 0: self.wId = -1 return True return False
def right(self, args): if self.hId != -1: self.btnList[self.hId].disable(None) self.hId = includes.clipInt(self.hId + 1, 0, len(self.btnList)-1) self.btnList[self.hId].enable(None)