public Command_Action Btn_ChangeState() { Command_Action command_Action = new Command_Action(); command_Action.defaultLabel = MADstateHelp.defaultLabel(); command_Action.defaultDesc = MADstateHelp.defaultDesc(curStateName); command_Action.icon = MADstateHelp.Icon(curStateName); //if (stateMAD.name == "trait") //{ // command_Action.icon = ContentFinder<Texture2D>.Get("UI/Commands/MAD_trait", true); //} //else //{ // command_Action.icon = ContentFinder<Texture2D>.Get("UI/Commands/MAD_story", true); //} command_Action.action = delegate { if (curStateName == "trait") { curStateName = "story"; } else { curStateName = "trait"; } if (HasAnyContents) { EjectContents(); } oldStateName = curStateName; }; command_Action.activateSound = SoundDef.Named("Click"); return(command_Action); }
public override string GetInspectString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append(base.GetInspectString()); stringBuilder.AppendLine(); stringBuilder.AppendLine(MADstateHelp.Inspect(curStateName)); return(stringBuilder.ToString()); }