Added 0 and 00. Fixed dialog positions.
This commit is contained in:
parent
aeaaa419fd
commit
af2bb31bd5
4 changed files with 46 additions and 7 deletions
|
@ -22,9 +22,9 @@ Item {
|
|||
color: {
|
||||
if (rouletteTable.numberOfBets < 2 || border.width == 2) {
|
||||
if (tapHandler.pressed) {
|
||||
"#AA999999"
|
||||
"#88999999"
|
||||
} else if (hoverHandler.hovered) {
|
||||
"#AAEEEEEE"
|
||||
"#88EEEEEE"
|
||||
} else {
|
||||
"#00000000"
|
||||
}
|
||||
|
@ -42,8 +42,8 @@ Item {
|
|||
onTapped: {
|
||||
if (rouletteTable.numberOfBets < 2 && parent.border.width == 0) {
|
||||
parent.border.width = 2
|
||||
roulette.showBetInputDialog(betType, index_, betButton.x + offsetX,
|
||||
betButton.y + offsetY)
|
||||
roulette.showBetInputDialog(betType, index_, betButton.parent.x + offsetX,
|
||||
betButton.parent.y + offsetY)
|
||||
} else if (parent.border.width == 2) {
|
||||
parent.border.width = 0
|
||||
PlayerAreaModel.removeBet(betType, index_)
|
||||
|
|
|
@ -52,6 +52,16 @@ Dialog {
|
|||
}
|
||||
|
||||
onAccepted: {
|
||||
/*
|
||||
* Qt has no good way of making bottom to top grid layouts, so I had to use
|
||||
* a workaround where the indexes do not work as expected.
|
||||
*
|
||||
* A solution for the indexes is to rotate the layout 180º, but that will mess up
|
||||
* the x and y coordinates which is even more annoying to fix.
|
||||
*/
|
||||
//if (betType == 9 && n < 35) {
|
||||
// n = 35 - n
|
||||
//}
|
||||
PlayerAreaModel.bet(betType, n, input.text)
|
||||
rouletteTable.numberOfBets += 1
|
||||
}
|
||||
|
|
|
@ -27,8 +27,8 @@ Item {
|
|||
betType: 7
|
||||
height: parent.height
|
||||
width: parent.width
|
||||
offsetX: 110
|
||||
offsetY: 110
|
||||
offsetX: 200
|
||||
offsetY: 225
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
31
Singles.qml
31
Singles.qml
|
@ -8,7 +8,7 @@ Item {
|
|||
LayoutMirroring.enabled: true
|
||||
flow: GridLayout.TopToBottom
|
||||
rows: 3
|
||||
rotation: 180
|
||||
//rotation: 180
|
||||
|
||||
anchors {
|
||||
right: parent.right
|
||||
|
@ -38,4 +38,33 @@ Item {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 0 */
|
||||
Item {
|
||||
x: 60
|
||||
y: 68
|
||||
BetButton {
|
||||
index_: 37
|
||||
betType: 9
|
||||
height: 66
|
||||
width: 28
|
||||
offsetX: 20
|
||||
offsetY: 55
|
||||
}
|
||||
}
|
||||
|
||||
/* 00 */
|
||||
Item {
|
||||
x: 60
|
||||
y: 136
|
||||
BetButton {
|
||||
index_: 38
|
||||
betType: 9
|
||||
height: 66
|
||||
width: 28
|
||||
offsetX: 20
|
||||
offsetY: 55
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue