aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components
diff options
context:
space:
mode:
authorRonny Strutz <ronny.strutz@multimedia-labs.de>2005-08-17 00:13:11 +0000
committerRonny Strutz <ronny.strutz@multimedia-labs.de>2005-08-17 00:13:11 +0000
commit7a900d0687c0c35396396d9fdedc454283312e55 (patch)
tree991edb9aa94fe03cd76ad580c4bcda987886a3b4 /lib/python/Components
parent7a53ecfee51d9792220d581a12bc8a68992ace0a (diff)
downloadenigma2-7a900d0687c0c35396396d9fdedc454283312e55.tar.gz
enigma2-7a900d0687c0c35396396d9fdedc454283312e55.zip
added working slider
Diffstat (limited to 'lib/python/Components')
-rw-r--r--lib/python/Components/config.py29
1 files changed, 19 insertions, 10 deletions
diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py
index f8e8fd13..4571fd4c 100644
--- a/lib/python/Components/config.py
+++ b/lib/python/Components/config.py
@@ -30,19 +30,28 @@ def configEntry(obj):
class Config:
def __init__(self):
pass
- def Slider(self,reg): # ok???
- pass
- def getControlType(self, reg):
- print "getControlType " + reg
-
- #find the correct type in class-members
- if reg == "blasel":
- return configBoolean(reg)
-
- return configBoolean(reg)
config = Config();
+class ConfigSlider:
+ def __init__(self, parent):
+ self.parent = parent
+ self.val = parent.value
+ def handleKey(self, key):
+ if key == 1:
+ self.val = self.val - 1
+ if key == 2:
+ self.val = self.val + 1
+
+ if self.val < 0:
+ self.val = 0
+
+ if self.val > 10:
+ self.val = 10
+
+ def __str__(self): #needed by configlist
+ return ("0", "10", "20", "30", "40", "50", "60", "70", "80", "90", "100")[self.val]
+
class ConfigSubsection:
def __init__(self):
pass