diff options
Diffstat (limited to 'lib/python/Components')
| -rw-r--r-- | lib/python/Components/config.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index ed85ed22..5a96a100 100644 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -65,9 +65,9 @@ class configBoolean: self.parent.save() def handleKey(self, key): - if key == 1: + if key == config.prevElement: self.parent.value = self.parent.value - 1 - if key == 2: + if key == config.nextElement: self.parent.value = self.parent.value + 1 self.checkValues() @@ -87,8 +87,10 @@ class configValue: class Config: def __init__(self): - pass - + self.choseElement = 0 + self.prevElement = 1 + self.nextElement = 2 + config = Config(); configfile = configFile() @@ -110,9 +112,9 @@ class ConfigSlider: self.parent.value = 10 def handleKey(self, key): - if key == 1: + if key == config.prevElement: self.parent.value = self.parent.value - 1 - if key == 2: + if key == config.nextElement: self.parent.value = self.parent.value + 1 self.checkValues() |
