From: Felix Domke Date: Tue, 21 Feb 2006 02:18:26 +0000 (+0000) Subject: 'pointer' attribute for position gauge X-Git-Tag: 2.6.0~4100 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/e8964009640203424b6180a0e93857062c01c166 'pointer' attribute for position gauge --- diff --git a/skin.py b/skin.py index 922b3d7e..5f27acca 100644 --- a/skin.py +++ b/skin.py @@ -72,6 +72,7 @@ def applySingleAttribute(guiObject, desktop, attrib, value): guiObject.setZPosition(int(value)) elif attrib == "pixmap": ptr = loadPNG(value) + # that __deref__ still scares me! desktop.makeCompatiblePixmap(ptr.__deref__()) guiObject.setPixmap(ptr.__deref__()) # guiObject.setPixmapFromFile(value) @@ -135,6 +136,12 @@ def applySingleAttribute(guiObject, desktop, attrib, value): }[value]) elif attrib == "enableWrapAround": guiObject.setWrapAround(True) + elif attrib == "pointer": + (name, pos) = value.split(':') + pos = parsePosition(pos) + ptr = loadPNG(name) + desktop.makeCompatiblePixmap(ptr.__deref__()) + guiObject.setPointer(ptr.__deref__(), pos) elif attrib != 'name': print "unsupported attribute " + attrib + "=" + value except int: