Exemple #1
0
    /// <summary> Draw button and read input</summary>
    private void ButtonPerPlayer(PlayerIdentity playerIdentity, int i)
    {
        bool highlighted = playerIdentity.hasUID(currentHighlightUID);

        GUI.color = highlighted ? Color.yellow : Color.white;
        var r = new Rect(10, 200 + 50 * i, 200, 45);

        if (GUI.Button(r, playerIdentity.GetDeviceName()))
        {
            CmdSetHighlightUID(playerIdentity.GetUID());
        }
    }