def onLoad(self, dataSection): PyGUIBase.onLoad(self, dataSection) self.isHorizontal = dataSection.readBool('isHorizontal', self.isHorizontal) self.minValue = dataSection.readFloat('minValue', self.minValue) self.maxValue = dataSection.readFloat('maxValue', self.maxValue) self.stepSize = dataSection.readFloat('stepSize', self.stepSize) VisualStateComponent.onLoad(self, dataSection)
def onSave(self, dataSection): PyGUIBase.onSave(self, dataSection) dataSection.writeBool('isHorizontal', self.isHorizontal) dataSection.writeFloat('minValue', self.minValue) dataSection.writeFloat('maxValue', self.maxValue) dataSection.writeFloat('stepSize', self.stepSize) VisualStateComponent.onSave(self, dataSection)
def onLoad(self, dataSection): PyGUIBase.onLoad(self, dataSection) self.buttonStyle = dataSection.readString('buttonStyle') self.buttonDisabled = dataSection.readBool('buttonDisabled', False) self.groupName = dataSection.readString('groupName') self.groupDepth = dataSection.readInt('groupDepth', 1) VisualStateComponent.onLoad(self, dataSection)
def onSave(self, dataSection): PyGUIBase.onSave(self, dataSection) dataSection.writeBool('buttonDisabled', self.buttonDisabled) dataSection.writeString('buttonStyle', self.buttonStyle) if self.groupName != '': dataSection.writeString('groupName', self.groupName) dataSection.writeInt('groupDepth', self.groupDepth) VisualStateComponent.onSave(self, dataSection)
def __init__(self, component): PyGUIBase.__init__(self, component) VisualStateComponent.__init__(self, component, Slider.visualStateString) component.script = self self.isHorizontal = True self.minValue = 0.0 self.maxValue = 1.0 self.stepSize = 0.1 self._value = 0.0 self.thumbPressed = False self.sliderDisabled = False self.component.focus = True self.component.mouseButtonFocus = True self.component.crossFocus = True self.component.moveFocus = True self.onValueChanged = lambda : None
def __init__(self, component): PyGUIBase.__init__(self, component) VisualStateComponent.__init__(self, component, Button.visualStateString) component.script = self self.component.focus = True self.component.mouseButtonFocus = True self.component.moveFocus = True self.component.crossFocus = True self.buttonStyle = Button.PRESSBUTTON_STYLE self.buttonPressed = False self.buttonActive = False self.buttonDisabled = False self.groupName = '' self.groupDepth = 1 self.hovering = False self.onClick = lambda : None self.onActivate = lambda : None self.onDeactivate = lambda : None