MultiplayerDemo
import QtQuick 2.0
import Felgo 3.0
Rectangle {
id: playerTag
width: text.width + paddingHorizontal * 2
height: text.height + paddingVertical * 2
radius: 4
color: player.activeTurn ? "#fff" : "#ccc"
border.width: player.leader? 2 : 1
border.color:player.leader? "#80000000" : "#0b000000"
property int paddingHorizontal: 12
property int paddingVertical: 7
property MultiplayerUser player: modelData
Text {
id: text
text: player.enabled ? player.name + " (" + player.userId + ")" : "Disabled"
anchors.centerIn: parent
anchors.verticalCenterOffset: 1
font.pixelSize: 16
color: "black"
}
Text {
id: invitedText
text: player.invited ? "Invited" : ""
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
font.pixelSize: 7
color: "gray"
}
Rectangle {
id: connectedText
width: 5
height: parent.height - 2
anchors.verticalCenter: parent.verticalCenter
x: parent.border.width
color: player.connected?"#7f97FF2E":"#8fFF2E2E"
radius: 7