1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 03:22:33 +01:00

Add text for mouse position

This commit is contained in:
Elias Steurer 2021-04-16 10:28:45 +02:00
parent 94a7f26b05
commit a5e07f5694

View File

@ -36,10 +36,10 @@ Rectangle {
onPositionChanged: {
setPosition()
}
onClicked: {
// setPosition()
// setPosition()
}
function setPosition() {
attractor.pointX = mouseX - 25
@ -52,8 +52,6 @@ Rectangle {
id: mouseDot
property int center: mouseDot.width * .5
width: 10
y: attractor.pointY
x: attractor.pointX
height: width
radius: width
z: 99
@ -104,6 +102,21 @@ Rectangle {
system: particleSystem
opacity: root.imgOpacity
}
Text {
id: txtMousePos
property int counter: 0
text: attractor.pointY + " - " +attractor.pointX
font.pointSize: 32
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
wrapMode: Text.WordWrap
anchors {
horizontalCenter: parent.horizontalCenter
bottom: txtButtonConter.top
bottomMargin: 20
}
color: "white"
}
Text {
id: txtButtonConter