コード例 #1
0
        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;
        }
コード例 #2
0
        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);
        }