@@ -119,6 +119,29 @@ ProjectScene {
119
119
color: priv .loading || ! priv .loaded ? " transparent" : " white"
120
120
clip: true
121
121
122
+ Component {
123
+ id: renderedTextBubble
124
+
125
+ Loader {
126
+ property QtObject model: null
127
+ active: model ? model .bubbleText !== " " : false
128
+ z: model ? model .bubbleLayer : 0
129
+
130
+ sourceComponent: TextBubble {
131
+ type: model .bubbleType
132
+ text: model .bubbleText
133
+ target: model .renderedTarget
134
+ stageScale: root .stageScale
135
+ stageWidth: root .stageWidth
136
+ stageHeight: root .stageHeight
137
+ x: target .x
138
+ y: target .y
139
+ }
140
+
141
+ Component .onCompleted : model = modelData
142
+ }
143
+ }
144
+
122
145
RenderedTarget {
123
146
id: stageTarget
124
147
engine: loader .engine
@@ -129,17 +152,9 @@ ProjectScene {
129
152
}
130
153
131
154
Loader {
132
- readonly property alias model : stageTarget .stageModel
155
+ readonly property alias modelData : stageTarget .stageModel
133
156
active: model ? model .bubbleText !== " " : false
134
-
135
- sourceComponent: TextBubble {
136
- type: model ? model .bubbleType : TextBubbleShape .Say
137
- text: model ? model .bubbleText : " "
138
- target: stageTarget
139
- stageScale: root .stageScale
140
- stageWidth: root .stageWidth
141
- stageHeight: root .stageHeight
142
- }
157
+ sourceComponent: renderedTextBubble
143
158
}
144
159
145
160
PenLayer {
@@ -220,20 +235,6 @@ ProjectScene {
220
235
Component.onCompleted: transform = targetItem.transform[0]
221
236
}
222
237
}*/
223
-
224
- Loader {
225
- readonly property alias model: targetItem .spriteModel
226
- active: model ? model .bubbleText !== " " : false
227
-
228
- sourceComponent: TextBubble {
229
- type: model ? model .bubbleType : TextBubbleShape .Say
230
- text: model ? model .bubbleText : " "
231
- target: targetItem
232
- stageScale: root .stageScale
233
- stageWidth: root .stageWidth
234
- stageHeight: root .stageHeight
235
- }
236
- }
237
238
}
238
239
}
239
240
@@ -249,6 +250,12 @@ ProjectScene {
249
250
delegate: renderedSprite
250
251
}
251
252
253
+ Repeater {
254
+ id: textBubbles
255
+ model: loader .sprites
256
+ delegate: renderedTextBubble
257
+ }
258
+
252
259
SceneMouseArea {
253
260
id: sceneMouseArea
254
261
anchors .fill : parent
0 commit comments