private float DoGenePreferences(Vector2 position, float width) { var rect = new Rect(position, new Vector2(width, 1000)); var listingStandard = new Listing_Standard(); listingStandard.Begin(rect); Text.Font = GameFont.Tiny; foreach (var gene in Constants.affectedStats) { var label = Constants.GetLabel(gene); var description = Constants.GetDescription(gene); var highlightRect = listingStandard.Label(label, -1f, description); highlightRect.height += DoSlider(listingStandard, gene); Widgets.DrawHighlightIfMouseover(highlightRect); } listingStandard.End(); return(listingStandard.CurHeight); }
public static String GetTooltip(StatDef gene) { return(Constants.GetDescription(gene)); }