Esempio n. 1
0
        public static void DrawContentSource(Rect r, ContentSource source, Action clickAction = null)
        {
            Rect rect = new Rect(r.x, r.y + r.height / 2f - 12f, 24f, 24f);

            GUI.DrawTexture(rect, source.GetIcon());
            Widgets.DrawHighlightIfMouseover(rect);
            TooltipHandler.TipRegion(rect, () => "Source".Translate() + ": " + source.HumanLabel(), (int)(r.x + r.y * 56161f));
            if (clickAction != null && Widgets.ButtonInvisible(rect, false))
            {
                clickAction();
            }
        }