// Token: 0x060012F2 RID: 4850 RVA: 0x000793A8 File Offset: 0x000777A8 protected void handleSubmitButtonClicked(Sleek2ImageButton button) { DirtyManager.save(); DevkitWindowManager.removeContainer(this); if (Level.isLoaded && Level.isEditor) { Level.save(); } }
public Sleek2Saveable(IDirtyable newDirtyable) { this.dirtyable = newDirtyable; this.toggle = new Sleek2Toggle(); this.toggle.transform.anchorMin = new Vector2(0f, 0f); this.toggle.transform.anchorMax = new Vector2(0f, 0f); this.toggle.transform.pivot = new Vector2(0f, 0f); this.toggle.transform.sizeDelta = new Vector2((float)Sleek2Config.bodyHeight, (float)Sleek2Config.bodyHeight); this.toggle.toggleComponent.isOn = DirtyManager.checkSaveable(this.dirtyable); this.toggle.toggled += this.handleToggleToggled; this.addElement(this.toggle); this.label = new Sleek2Label(); this.label.transform.anchorMin = new Vector2(0f, 0f); this.label.transform.anchorMax = new Vector2(1f, 1f); this.label.transform.pivot = new Vector2(0f, 0f); this.label.transform.offsetMin = new Vector2((float)(Sleek2Config.bodyHeight + 5), 0f); this.label.transform.offsetMax = new Vector2(0f, 0f); this.label.textComponent.text = this.dirtyable.ToString(); this.label.textComponent.alignment = 3; this.addElement(this.label); }
protected virtual void handleToggleToggled(Sleek2Toggle toggle, bool isOn) { DirtyManager.toggleSaveable(this.dirtyable); }