public static void AddVoteChoice(RuleDef selection, ChoiceMenu choiceMenu) { VoteChoiceDef choice = CreateChoice(ref selection, choiceMenu.TooltipName, null, false); choice.tooltipNameToken = choiceMenu.TooltipName; choice.tooltipNameColor = choiceMenu.TooltipNameColor; choice.tooltipBodyToken = choiceMenu.TooltipBody; choice.tooltipBodyColor = choiceMenu.TooltipBodyColor; choice.spritePath = choiceMenu.IconPath; //choice.unlockableName = choiceMenu.UnlockableName; choice.VoteIndex = choiceMenu.ChoiceIndex; }
public static RuleDef AddVoteSelection(RuleCategoryDef header, string selectionName, ChoiceMenu choiceMenu) { RuleDef selection = new RuleDef("Votes." + selectionName, selectionName); selection.category = header; AddVoteChoice(selection, choiceMenu); header.children.Add(selection); VoteSelections.Add(selection); return(selection); }