public void SaveClaim(MatryxCommit commit) { if (!saves.ContainsKey(commit.hash)) { SaveExpression(customParametrizedSurface.expressionSets, commit.ipfsContentHash); } }
public void UpdateDisplay(object commit) { MatryxCommit niceCommit = (MatryxCommit)commit; description.text = "Content: \n\n" + niceCommit.content; importButton.commit = niceCommit; importButton.Enable(); if (niceCommit.parentHash != null && niceCommit.parentHash != "") { parentCommitButton.parentCommitLabel.text = niceCommit.parentHash.Substring(0, 10); } }
private void HandleInput(GameObject source) { if (source.name == "Load_Button") { LoadMoreMyCommits(); } else if (source.GetComponent <CommitContainer>()) { string name = source.name; MatryxCommit commit = source.GetComponent <CommitContainer>().commit; // TODO: Navigate the user to the corresponding tournament through the menus commitMenu.gameObject.GetComponent <AnimationHandler>().OpenMenu(); commitMenu.SetCommit(commit); } }
public void SetCommit(string commitHash) { if (commitHash.Equals("")) { parentCommitButton.transform.parent.gameObject.SetActive(false); } else { parentCommitButton.transform.parent.gameObject.SetActive(true); } this.commit = new MatryxCommit(commitHash); title.text = "Commit " + commit.hash.Substring(0, 10); description.text = "Content: \n\n"; importButton.Disable(); MatryxCortex.RunGetCommit(commit.hash, true, UpdateDisplay, ErrorGettingCommit); }
private GameObject createButton(MatryxCommit commit) { GameObject button = Instantiate(Resources.Load("Commit_Cell", typeof(GameObject))) as GameObject; button.transform.SetParent(commitsPanel.transform); button.transform.localScale = Vector3.one; var commitTimestamp = Utils.Time.FromUnixTime(commit.timestamp); button.name = commitTimestamp.ToShortDateString() + ", " + commitTimestamp.ToShortTimeString(); button.GetComponent <CommitContainer>().commit = commit; button.transform.Find("Icon").GetComponent <Renderer>().material.mainTexture = commit.previewImage; button.transform.Find("Text").GetComponent <TMPro.TextMeshPro>().text = button.name; scroll.addObject(button.transform); joyStickAggregator.AddForwarder(button.GetComponentInChildren <JoyStickForwarder>()); return(button); }
public void SetCommit(MatryxCommit commit) { if (commit == null) { parentCommitButton.transform.parent.gameObject.SetActive(false); } else { parentCommitButton.transform.parent.gameObject.SetActive(true); } this.commit = commit; title.text = "Commit " + commit.hash.Substring(0, 10); var datetime = TimeZoneInfo.ConvertTime(Utils.Time.FromUnixTime((double)commit.timestamp), TimeZoneInfo.Local); creationDate.text = datetime.ToShortDateString() + ", " + datetime.ToLongTimeString(); description.text = "Content: \n\n"; creator.text = "by " + Utils.Accounts.ellipseAddress(commit.owner); importButton.Disable(); MatryxCortex.RunGetCommit(commit.hash, true, UpdateDisplay, ErrorGettingCommit); }