forked from brmlab/brmbar-github
brmbarv3 Withdraw: Allow keyboard text entry
This commit is contained in:
parent
a5ffdf27e8
commit
ee90915300
1 changed files with 5 additions and 3 deletions
|
@ -8,7 +8,7 @@ Item {
|
||||||
|
|
||||||
property variant username: ""
|
property variant username: ""
|
||||||
property variant userdbid: ""
|
property variant userdbid: ""
|
||||||
property variant amount: ""
|
property variant amount: withdraw_pad.enteredText
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: item_name
|
id: item_name
|
||||||
|
@ -49,12 +49,14 @@ Item {
|
||||||
x: 65
|
x: 65
|
||||||
y: 195
|
y: 195
|
||||||
visible: parent.username != ""
|
visible: parent.username != ""
|
||||||
onLetterEntered: { amount = amount.toString() + letter; }
|
focus: parent.username != ""
|
||||||
onLetterBackspace: { amount = amount.toString().replace(/.$/, ''); }
|
Keys.onReturnPressed: { withdraw_button.buttonClick() }
|
||||||
|
Keys.onEscapePressed: { cancel.buttonClick() }
|
||||||
}
|
}
|
||||||
|
|
||||||
BarcodeInput {
|
BarcodeInput {
|
||||||
color: "#00ff00" /* just for debugging */
|
color: "#00ff00" /* just for debugging */
|
||||||
|
focus: parent.username == ""
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
var acct = shop.barcodeInput(text)
|
var acct = shop.barcodeInput(text)
|
||||||
text = ""
|
text = ""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue