protected override string GetHeaderTip(PawnTable table)
 {
     return(base.GetHeaderTip(table) + "\n" + "CheckboxShiftClickTip".Translate());
 }
 public override int GetMaxWidth(PawnTable table)
 {
     return(24);
 }
 public override void DoCell(Rect rect, Pawn pawn, PawnTable table)
 {
     Widgets.InfoCardButtonCentered(rect, pawn);
 }
 public override int GetOptimalWidth(PawnTable table)
 {
     return(this.GetMaxWidth(table));
 }
Exemplo n.º 5
0
 public override void DoHeader(Rect rect, PawnTable table)
 {
     base.DoHeader(rect, table);
     MouseoverSounds.DoRegion(rect);
 }
 public override int GetOptimalWidth(PawnTable table)
 {
     return(Mathf.Clamp(39, GetMinWidth(table), GetMaxWidth(table)));
 }
 public override int GetMinWidth(PawnTable table)
 {
     return(Mathf.Max(base.GetMinWidth(table), 24));
 }
Exemplo n.º 8
0
        protected virtual Rect GetInteractableHeaderRect(Rect headerRect, PawnTable table)
        {
            float num = Mathf.Min(25f, headerRect.height);

            return(new Rect(headerRect.x, headerRect.yMax - num, headerRect.width, num));
        }
Exemplo n.º 9
0
 public abstract void DoCell(Rect rect, Pawn pawn, PawnTable table);
 public override void DoCell(Rect rect, Pawn pawn, PawnTable table)
 {
 }
Exemplo n.º 11
0
 public virtual int GetOptimalWidth(PawnTable table)
 {
     return(this.GetMinWidth(table));
 }
 public override int GetOptimalWidth(PawnTable table)
 {
     return(Mathf.Clamp(Mathf.CeilToInt(354f), this.GetMinWidth(table), this.GetMaxWidth(table)));
 }
 public override int GetMinWidth(PawnTable table)
 {
     return(Mathf.Max(base.GetMinWidth(table), Mathf.CeilToInt(194f)));
 }
 public override void Notify_ResolutionChanged()
 {
     table = CreateTable();
     base.Notify_ResolutionChanged();
 }
        protected override void HeaderClicked(Rect headerRect, PawnTable table)
        {
            base.HeaderClicked(headerRect, table);
            if (!Event.current.shift)
            {
                return;
            }
            List <Pawn> pawnsListForReading = table.PawnsListForReading;

            for (int i = 0; i < pawnsListForReading.Count; i++)
            {
                Pawn pawn = pawnsListForReading[i];
                if (pawn.workSettings == null || !pawn.workSettings.EverWork || pawn.WorkTypeIsDisabled(def.workType))
                {
                    continue;
                }
                if (Find.PlaySettings.useWorkPriorities)
                {
                    int priority = pawn.workSettings.GetPriority(def.workType);
                    if (Event.current.button == 0 && priority != 1)
                    {
                        int num = priority - 1;
                        if (num < 0)
                        {
                            num = 4;
                        }
                        pawn.workSettings.SetPriority(def.workType, num);
                    }
                    if (Event.current.button == 1 && priority != 0)
                    {
                        int num2 = priority + 1;
                        if (num2 > 4)
                        {
                            num2 = 0;
                        }
                        pawn.workSettings.SetPriority(def.workType, num2);
                    }
                }
                else if (pawn.workSettings.GetPriority(def.workType) > 0)
                {
                    if (Event.current.button == 1)
                    {
                        pawn.workSettings.SetPriority(def.workType, 0);
                    }
                }
                else if (Event.current.button == 0)
                {
                    pawn.workSettings.SetPriority(def.workType, 3);
                }
            }
            if (Find.PlaySettings.useWorkPriorities)
            {
                SoundDefOf.DragSlider.PlayOneShotOnCamera();
            }
            else if (Event.current.button == 0)
            {
                SoundDefOf.Checkbox_TurnedOn.PlayOneShotOnCamera();
            }
            else if (Event.current.button == 1)
            {
                SoundDefOf.Checkbox_TurnedOff.PlayOneShotOnCamera();
            }
        }
Exemplo n.º 16
0
 public virtual int GetMaxWidth(PawnTable table)
 {
     return(1000000);
 }
 public override int GetMinHeaderHeight(PawnTable table)
 {
     return(50);
 }
 public override int GetMinHeaderHeight(PawnTable table)
 {
     return(Mathf.Max(base.GetMinHeaderHeight(table), 65));
 }
 protected override Rect GetInteractableHeaderRect(Rect headerRect, PawnTable table)
 {
     return(GetLabelRect(headerRect));
 }
Exemplo n.º 20
0
 public override void DoCell(Rect rect, Pawn pawn, PawnTable table)
 {
     MedicalCareUtility.MedicalCareSelectButton(rect, pawn);
 }
 public override int GetMaxWidth(PawnTable table)
 {
     return(Mathf.Min(base.GetMaxWidth(table), this.GetMinWidth(table)));
 }
 public override int GetMinWidth(PawnTable table)
 {
     return(0);
 }