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:
parent
94a7f26b05
commit
a5e07f5694
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user