public static void DrawFactionButton(Rect rect, CompPauldronDrawer comp, ShoulderPadEntry entry, bool paintable = false)
        {
            Rect rect1 = rect.LeftHalf().LeftHalf();
            Rect rect2 = rect.LeftHalf().RightHalf();

            rect2.width *= 2;
            Rect rect3 = rect.RightHalf().RightHalf();

            Widgets.Label(rect1, comp.GetDescription(entry.shoulderPadType));
            Widgets.Dropdown <ShoulderPadEntry, PauldronTextureOption>
            (
                rect2,
                entry,
                (ShoulderPadEntry sp) => entry.Used,
                new Func <ShoulderPadEntry, IEnumerable <Widgets.DropdownMenuElement <PauldronTextureOption> > >(DrawFactionButton_GenerateMenu),
                entry.Used.Label,
                null,
                null,
                null,
                delegate()
            {
            },
                paintable
            );
        }
Beispiel #2
0
        public static void DrawVariantButton(Rect rect, CompPauldronDrawer comp, ShoulderPadEntry entry, bool paintable)
        {
            Rect rect1 = rect.LeftHalf().LeftHalf();
            Rect rect2 = rect.LeftHalf().RightHalf();

            rect2.width *= 2;
            //   entry.Drawer = comp;
            Rect rect3 = rect.RightHalf().RightHalf();

            Widgets.Label(rect1, comp.GetDescription(entry.shoulderPadType));


            Widgets.Dropdown <ShoulderPadEntry, PauldronTextureOption>(rect2, entry, (ShoulderPadEntry p) => p.Used, new Func <ShoulderPadEntry, IEnumerable <Widgets.DropdownMenuElement <PauldronTextureOption> > >(DrawVariantButton_GenerateMenu), entry.Used.Label, null, null, null, null, true);

            /*
             * Widgets.Dropdown<ShoulderPadEntry, PauldronTextureOption>(rect2, entry,
             *  (ShoulderPadEntry sp) => sp.Used,
             *  new Func<ShoulderPadEntry, IEnumerable<Widgets.DropdownMenuElement<PauldronTextureOption>>>(DrawVariantButton_GenerateMenu),
             *  entry.VariantTextures.activeOption.Label, null, null, null, delegate ()
             *  {
             *
             *  }, paintable);
             */
        }