// Token: 0x06001364 RID: 4964 RVA: 0x0007B5E8 File Offset: 0x000799E8 public TranslationLeafUpdateField(TranslationLeaf newOriginLeaf, TranslationLeaf newTranslationLeaf) { base.name = "Leaf_Update"; this.originLeaf = newOriginLeaf; this.translationLeaf = newTranslationLeaf; this.climbButton = new Sleek2ImageLabelButton(); this.climbButton.transform.anchorMin = new Vector2(0f, 0f); this.climbButton.transform.anchorMax = new Vector2(1f, 0f); this.climbButton.transform.pivot = new Vector2(0f, 1f); this.climbButton.transform.offsetMin = new Vector2(0f, (float)(Sleek2Config.bodyHeight * 2)); this.climbButton.transform.offsetMax = new Vector2(0f, (float)(Sleek2Config.bodyHeight * 3)); this.addElement(this.climbButton); this.originField = new Sleek2Field(); this.originField.transform.anchorMin = new Vector2(0f, 0f); this.originField.transform.anchorMax = new Vector2(1f, 0f); this.originField.transform.pivot = new Vector2(0f, 1f); this.originField.transform.offsetMin = new Vector2(0f, (float)Sleek2Config.bodyHeight); this.originField.transform.offsetMax = new Vector2(0f, (float)(Sleek2Config.bodyHeight * 2)); this.originField.fieldComponent.interactable = false; this.addElement(this.originField); this.translationField = new Sleek2Field(); this.translationField.transform.anchorMin = new Vector2(0f, 0f); this.translationField.transform.anchorMax = new Vector2(1f, 0f); this.translationField.transform.pivot = new Vector2(0f, 1f); this.translationField.transform.offsetMin = new Vector2(0f, 0f); this.translationField.transform.offsetMax = new Vector2(0f, (float)Sleek2Config.bodyHeight); this.translationField.submitted += this.handleTextSubmitted; this.addElement(this.translationField); this.refreshFields(); this.layoutComponent = base.gameObject.AddComponent <LayoutElement>(); this.layoutComponent.preferredHeight = (float)(Sleek2Config.bodyHeight * 3); }
// Token: 0x060037E3 RID: 14307 RVA: 0x0018C5CC File Offset: 0x0018A9CC private static void refreshSongs() { PlayerBarricadeStereoUI.songs.Clear(); Assets.find <StereoSongAsset>(PlayerBarricadeStereoUI.songs); PlayerBarricadeStereoUI.songsBox.remove(); PlayerBarricadeStereoUI.songsBox.area = new Rect(0f, 0f, 5f, (float)(PlayerBarricadeStereoUI.songs.Count * 30)); for (int i = 0; i < PlayerBarricadeStereoUI.songs.Count; i++) { StereoSongAsset stereoSongAsset = PlayerBarricadeStereoUI.songs[i]; SleekButton sleekButton = new SleekButton(); sleekButton.positionOffset_Y = i * 30; sleekButton.sizeOffset_X = -30; sleekButton.sizeOffset_Y = 30; sleekButton.sizeScale_X = 1f; SleekButton sleekButton2 = sleekButton; Delegate onClickedButton = sleekButton2.onClickedButton; if (PlayerBarricadeStereoUI.< > f__mg$cache0 == null) { PlayerBarricadeStereoUI.< > f__mg$cache0 = new ClickedButton(PlayerBarricadeStereoUI.onClickedPlayButton); } sleekButton2.onClickedButton = (ClickedButton)Delegate.Combine(onClickedButton, PlayerBarricadeStereoUI.< > f__mg$cache0); PlayerBarricadeStereoUI.songsBox.add(sleekButton); TranslationLeaf leaf = Translator.getLeaf(stereoSongAsset.title); if (leaf != null) { sleekButton.text = leaf.text; } } }
public TranslationLeafField(TranslationLeaf newLeaf) { base.name = "Leaf"; this.leaf = newLeaf; if (this.leaf != null) { this.leaf.branch.keyChanged += this.handleKeyChanged; this.leaf.versionChanged += this.handleVersionChanged; } this.climbButton = new Sleek2ImageLabelButton(); this.climbButton.transform.anchorMin = new Vector2(0f, 0.5f); this.climbButton.transform.anchorMax = new Vector2(0.5f, 1f); this.climbButton.transform.offsetMin = new Vector2(0f, 0f); this.climbButton.transform.offsetMax = new Vector2(0f, 0f); this.addElement(this.climbButton); this.keyField = new Sleek2Field(); this.keyField.transform.anchorMin = new Vector2(0.5f, 0.5f); this.keyField.transform.anchorMax = new Vector2(1f, 1f); this.keyField.transform.offsetMin = new Vector2(0f, 0f); this.keyField.transform.offsetMax = new Vector2(0f, 0f); this.keyField.submitted += this.handleKeySubmitted; this.addElement(this.keyField); this.textField = new Sleek2Field(); this.textField.transform.anchorMin = new Vector2(0f, 0f); this.textField.transform.anchorMax = new Vector2(1f, 0.5f); this.textField.transform.offsetMin = new Vector2(0f, 0f); this.textField.transform.offsetMax = new Vector2(-40f, 0f); this.textField.submitted += this.handleTextSubmitted; this.addElement(this.textField); this.versionField = new Sleek2IntField(); this.versionField.transform.anchorMin = new Vector2(1f, 0f); this.versionField.transform.anchorMax = new Vector2(1f, 0.5f); this.versionField.transform.offsetMin = new Vector2(-40f, 0f); this.versionField.transform.offsetMax = new Vector2(0f, 0f); this.versionField.fieldComponent.interactable = false; this.addElement(this.versionField); this.refreshKey(); this.refreshFields(); this.refreshVersion(); this.layoutComponent = base.gameObject.AddComponent <LayoutElement>(); this.layoutComponent.preferredHeight = (float)(Sleek2Config.bodyHeight * 2); }
protected virtual void handleVersionChanged(TranslationLeaf leaf, int oldVersion, int newVersion) { this.refreshVersion(); }