mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 20:58:38 +02:00
Merge pull request #12129 from SamGondelman/doubleClick
Move key logic from onClicked to onReleased
This commit is contained in:
commit
457fcd6f40
1 changed files with 8 additions and 12 deletions
|
@ -45,18 +45,6 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onClicked: {
|
|
||||||
mouse.accepted = true;
|
|
||||||
Tablet.playSound(TabletEnums.ButtonClick);
|
|
||||||
|
|
||||||
webEntity.synthesizeKeyPress(glyph);
|
|
||||||
webEntity.synthesizeKeyPress(glyph, mirrorText);
|
|
||||||
|
|
||||||
if (toggle) {
|
|
||||||
toggled = !toggled;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onDoubleClicked: {
|
onDoubleClicked: {
|
||||||
mouse.accepted = true;
|
mouse.accepted = true;
|
||||||
}
|
}
|
||||||
|
@ -94,6 +82,14 @@ Item {
|
||||||
|
|
||||||
onReleased: {
|
onReleased: {
|
||||||
if (containsMouse) {
|
if (containsMouse) {
|
||||||
|
Tablet.playSound(TabletEnums.ButtonClick);
|
||||||
|
|
||||||
|
webEntity.synthesizeKeyPress(glyph);
|
||||||
|
webEntity.synthesizeKeyPress(glyph, mirrorText);
|
||||||
|
|
||||||
|
if (toggle) {
|
||||||
|
toggled = !toggled;
|
||||||
|
}
|
||||||
keyItem.state = "mouseOver";
|
keyItem.state = "mouseOver";
|
||||||
} else {
|
} else {
|
||||||
if (toggled) {
|
if (toggled) {
|
||||||
|
|
Loading…
Reference in a new issue