diff options
Diffstat (limited to 'addons/bubblemessage.py')
-rw-r--r-- | addons/bubblemessage.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/addons/bubblemessage.py b/addons/bubblemessage.py index 7a8bc72..0ed5f7e 100644 --- a/addons/bubblemessage.py +++ b/addons/bubblemessage.py @@ -19,15 +19,17 @@ class BubbleMessage(Action): message = TStringProperty("Message") # Create the position as an array of fixed-size 2 position = TArrayProperty([0,0], 2, 2) + #position = TPositionProperty((0,0)) #Create a list of tail positions as an array of N element : N to be defined... - tail_pos = TArrayOneTypeProperty([[0,0],[0,0],[0,0]], 3, 3) - + tail_pos = TArrayOneTypeProperty([position, position, position],type(position)) + #Bug quand je declare un TIntProperty. creator.py, index out of range + def __init__(self, message=None, pos=None, speaker=None, tailpos=None): """ Shows a dialog with a given text, at the given position on the screen. @param message A string to display to the user - @param pos A list of the form [x, y] + @param pos A list of the form [x, y] @param speaker treeish representation of the speaking widget @param tailpos The position of each tail of the bubble; useful to point to specific elements of the interface @@ -38,8 +40,6 @@ class BubbleMessage(Action): self.position = pos if tailpos: self.tail_pos = tailpos - if tailpos2: - self.tail_pos2 = tailpos2 if message: self.message = message @@ -65,7 +65,7 @@ class BubbleMessage(Action): # TODO: tails are relative to tailpos. They should be relative to # the speaking widget. Same of the bubble position. self._bubble = overlayer.TextBubble(text=self.message, - tailpos=self.tail_pos, tailpos2=self.tail_pos2) + tailpos=self.tail_pos) self._bubble.show() self.overlay.put(self._bubble, x, y) self.overlay.queue_draw() @@ -88,7 +88,7 @@ class BubbleMessage(Action): assert not self._drag, "bubble action set to editmode twice" x, y = self.position self._bubble = overlayer.TextBubble(text=self.message, - tailpos=self.tail_pos, tailpos2=self.tail_pos2) + tailpos=self.tail_pos) self.overlay.put(self._bubble, x, y) self._bubble.show() @@ -96,7 +96,7 @@ class BubbleMessage(Action): def exit_editmode(self, *args): x,y = self._drag.position - self.position = [int(x), int(y)] + self.position = [int(x), int(y)]#on perd la validation non ? if self._drag: self._drag.draggable = False self._drag = None |