Beispiel #1
0
class KeyParameter(ParameterCommon):
    key = None

    def read(self, reader):
        self.key = Key(reader.readShort())

    def write(self, reader):
        reader.writeShort(self.key.getValue())
Beispiel #2
0
class KeyParameter(ParameterCommon):
    key = None
    
    def read(self, reader):
        self.key = Key(reader.readShort())
    
    def write(self, reader):
        reader.writeShort(self.key.getValue())
Beispiel #3
0
class Keys(DataLoader):
    up = None
    down = None
    left = None
    right = None
    button1 = None
    button2 = None
    button3 = None
    button4 = None

    def initialize(self):
        self.up = Key()
        self.down = Key()
        self.left = Key()
        self.right = Key()
        self.button1 = Key()
        self.button2 = Key()
        self.button3 = Key()
        self.button4 = Key()

    def read(self, reader):
        self.up.setValue(reader.readShort())
        self.down.setValue(reader.readShort())
        self.left.setValue(reader.readShort())
        self.right.setValue(reader.readShort())
        self.button1.setValue(reader.readShort())
        self.button2.setValue(reader.readShort())
        self.button3.setValue(reader.readShort())
        self.button4.setValue(reader.readShort())

    def write(self, reader):
        reader.writeShort(self.up.getValue())
        reader.writeShort(self.down.getValue())
        reader.writeShort(self.left.getValue())
        reader.writeShort(self.right.getValue())
        reader.writeShort(self.button1.getValue())
        reader.writeShort(self.button2.getValue())
        reader.writeShort(self.button3.getValue())
        reader.writeShort(self.button4.getValue())
Beispiel #4
0
class Keys(DataLoader):
    up = None
    down = None
    left = None
    right = None
    button1 = None
    button2 = None
    button3 = None
    button4 = None
    
    def initialize(self):
        self.up = Key()
        self.down = Key()
        self.left = Key()
        self.right = Key()
        self.button1 = Key()
        self.button2 = Key()
        self.button3 = Key()
        self.button4 = Key()
        
    def read(self, reader):
        self.up.setValue(reader.readShort())
        self.down.setValue(reader.readShort())
        self.left.setValue(reader.readShort())
        self.right.setValue(reader.readShort())
        self.button1.setValue(reader.readShort())
        self.button2.setValue(reader.readShort())
        self.button3.setValue(reader.readShort())
        self.button4.setValue(reader.readShort())

    def write(self, reader):
        reader.writeShort(self.up.getValue())
        reader.writeShort(self.down.getValue())
        reader.writeShort(self.left.getValue())
        reader.writeShort(self.right.getValue())
        reader.writeShort(self.button1.getValue())
        reader.writeShort(self.button2.getValue())
        reader.writeShort(self.button3.getValue())
        reader.writeShort(self.button4.getValue())