Exemplo n.º 1
0
    private void DisplayTournaments(List <MatryxTournament> _tournaments)
    {
        foreach (MatryxTournament tournament in _tournaments)
        {
            GameObject button = createButton(tournament);
            button.SetActive(false);
            tournamentsPanel.AddAction(button.GetComponent <FlexButtonComponent>());
        }

        loadButton = createLoadButton();
    }
Exemplo n.º 2
0
    private void DisplayCommits(List <MatryxCommit> _commits)
    {
        foreach (MatryxCommit commit in _commits)
        {
            commits.Add(commit.hash, commit);
            GameObject button = createButton(commit);
            button.SetActive(false);
            commitsPanel.AddAction(button.GetComponent <FlexButtonComponent>());
        }

        loadButton = createLoadButton();
    }
Exemplo n.º 3
0
    public void DisplaySubmissions(List <Matryx_Submission> _submissions)
    {
        foreach (Matryx_Submission submission in _submissions)
        {
            GameObject button = createButton(submission);
            button.SetActive(false);
            submissionsPanel.AddAction(button.GetComponent <FlexButtonComponent>());
        }

        loadButton = createLoadButton();
        submissionsPanel.AddAction(loadButton.GetComponent <FlexButtonComponent>());
    }
Exemplo n.º 4
0
    private void LoadFiles()
    {
        saves = loader.LoadExpressions();

        List <Transform> toAdd = new List <Transform>();

        foreach (SavePackage save in saves.Values)
        {
            GameObject button = createButton(save);
            button.SetActive(false);
            selectPanel.AddAction(button.GetComponent <FlexButtonComponent>());
        }
    }
Exemplo n.º 5
0
    private void DisplayTournaments(List <MatryxTournament> _tournaments)
    {
        foreach (MatryxTournament tournament in _tournaments)
        {
            if (tournaments.ContainsKey(tournament.address))
            {
                continue;
            }
            tournaments.Add(tournament.address, tournament);
            GameObject button = createButton(tournament);
            button.SetActive(false);
            myTournamentsPanel.AddAction(button.GetComponent <FlexButtonComponent>());
        }

        loadButton = createLoadButton();
    }
Exemplo n.º 6
0
 private void DisplaySubmissions(List <MatryxSubmission> submissions)
 {
     if (submissions.Count == 0)
     {
         infoText.gameObject.SetActive(true);
         infoText.text = "No Submissions On This Tournament";
     }
     foreach (MatryxSubmission submission in submissions)
     {
         GameObject button = createButton(submission);
         button.SetActive(false);
         submissionsPanel.AddAction(button.GetComponent <FlexButtonComponent>());
     }
 }
Exemplo n.º 7
0
    public void DisplaySubmissions(List <MatryxSubmission> submissions, string listTitle)
    {
        if (submissions.Count == 0)
        {
            winningAndMySubmissions.SetActive(false);
            return;
        }

        winningAndMySubmissions.SetActive(true);
        createHeaderButton(listTitle);
        foreach (MatryxSubmission submission in submissions)
        {
            GameObject button = createButton(submission);
            button.SetActive(false);
            submissionsPanel.AddAction(button.GetComponent <FlexButtonComponent>());
        }

        // TODO: Decide: Keep this?
        //loadButton = createLoadButton();
        //submissionsPanel.AddAction(loadButton.GetComponent<FlexButtonComponent>());
    }
Exemplo n.º 8
0
    public void Refresh()
    {
        if (!initialized)
        {
            Initialize();
        }
        if (!baseAccount.Equals(NetworkSettings.mnemonicWallet.GetAccount(0).Address))
        {
            var accounts = NetworkSettings.mnemonicWallet.GetAddresses();
            ClearAccounts();
            baseAccount = accounts[0];

            for (int i = 0; i < accounts.Length; i++)
            {
                GameObject button = createButton(accounts[i]);
                // button.SetActive(false);
                accountsPanel.AddAction(button.GetComponent <FlexButtonComponent>());
            }

            RefreshText();
        }
    }