public Dialog_StoryTellerComponentDialog(IsValid isValid) { this.forcePause = true; this.doCloseX = true; this.absorbInputAroundWindow = true; this.closeOnAccept = false; this.closeOnClickedOutside = true; this.isValid = isValid; this.compInput = new EnumInputWidget <Dialog_StoryTellerComponentDialog, StoryTellerCompPropertyTypes>( this, "Component", 100, d => { if (d.comp != null) { return(StorytellerCompPropertiesStats.GetType(d.comp.compClass.Name)); } return(StoryTellerCompPropertyTypes.None); }, (d, v) => { this.comp = StorytellerCompPropertiesStats.CreateStorytellerCompProperties(v); if (this.comp != null) { this.categoryInput = null; this.incidentInput = null; if (StorytellerCompPropertiesStats.HasCategory(d.comp)) { CreateCategoryInput(); } if (StorytellerCompPropertiesStats.HasIncident(d.comp)) { CreateIncidentInput(); } } }); }
private void CreateIncidentInput() { this.incidentInput = new DefInputWidget <StorytellerCompProperties, IncidentDef>(this.comp, "Incident", 100, c => StorytellerCompPropertiesStats.GetIncident(c), (c, v) => StorytellerCompPropertiesStats.SetIncident(c, v), true); }
private void CreateCategoryInput() { this.categoryInput = new DefInputWidget <StorytellerCompProperties, IncidentCategoryDef>(this.comp, "Category", 100, c => StorytellerCompPropertiesStats.GetCategory(c), (c, v) => StorytellerCompPropertiesStats.SetCategory(c, v), true); }