Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tutorius/properties.py
diff options
context:
space:
mode:
Diffstat (limited to 'tutorius/properties.py')
-rw-r--r--tutorius/properties.py27
1 files changed, 26 insertions, 1 deletions
diff --git a/tutorius/properties.py b/tutorius/properties.py
index a0d63bb..1905117 100644
--- a/tutorius/properties.py
+++ b/tutorius/properties.py
@@ -36,7 +36,9 @@ from .propwidgets import PropWidget, \
EventTypePropWidget, \
IntPropWidget, \
FloatPropWidget, \
- IntArrayPropWidget
+ IntArrayPropWidget, \
+ ResourcePropWidget, \
+ ScreenClipPropWidget
import logging
LOGGER = logging.getLogger("properties")
@@ -372,6 +374,9 @@ class TResourceProperty(TutoriusProperty):
TFileProperties with absolute paths, so that they can be used on any
machine.
"""
+
+ widget_class = ResourcePropWidget
+
def __init__(self, resource_name=""):
"""
Creates a new resource pointing to an existing resource.
@@ -386,6 +391,26 @@ class TResourceProperty(TutoriusProperty):
self.default = self.validate("")
+class TScreenClipProperty(TResourceProperty):
+ """
+ Represents an image resource from a screen capture
+
+ When the system encounters a resource, it knows that it refers to a file in
+ the resource folder and that it should translate this resource name to an
+ absolute file name before it is executed.
+ """
+
+ widget_class = ScreenClipPropWidget
+
+ def __init__(self, *args, **kwargs):
+ """
+ Creates a new resource pointing to an existing resource.
+
+ @param resource_name The file name of the resource (should be only the
+ file name itself, no directory information)
+ """
+ super(TScreenClipProperty, self).__init__(*args, **kwargs)
+
class TEnumProperty(TutoriusProperty):
"""
Represents a value in a given enumeration. This means that the value will