Skip to content

Commit

Permalink
Fixed panel heights to fill the vertical space. Fixed health option l…
Browse files Browse the repository at this point in the history
…abels. Removed class for old Age panel
  • Loading branch information
edbmods committed Dec 25, 2022
1 parent ce7751d commit 75dd732
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 157 deletions.
1 change: 0 additions & 1 deletion EdBPrepareCarefully.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
<Compile Include="Source\PanelFaction.cs" />
<Compile Include="Source\PanelHealth.cs" />
<Compile Include="Source\PanelIdeo.cs" />
<Compile Include="Source\PanelModuleAge.cs" />
<Compile Include="Source\PanelTitles.cs" />
<Compile Include="Source\PanelTraits.cs" />
<Compile Include="Source\InitializationException.cs" />
Expand Down
4 changes: 2 additions & 2 deletions Source/PanelHealth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,8 @@ public void DrawAddButton(float y, float width) {
CancelButtonLabel = "EdB.PC.Common.Cancel".Translate(),
HeaderLabel = "EdB.PC.Dialog.Injury.Header".Translate(),
NameFunc = (InjuryOption option) => {
return option.HediffDef.defName;
//return option.Label;
//return option.HediffDef.defName;
return option.Label;
},
DescriptionFunc = (InjuryOption option) => {
return option.HediffDef?.description;
Expand Down
147 changes: 0 additions & 147 deletions Source/PanelModuleAge.cs

This file was deleted.

2 changes: 1 addition & 1 deletion Source/ProviderHealthOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace EdB.PrepareCarefully {
public class ProviderHealthOptions {
protected Dictionary<ThingDef, OptionsHealth> optionsLookup = new Dictionary<ThingDef, OptionsHealth>();
protected HashSet<string> excludedOptions = new HashSet<string>() {
"VatLearning", "VatGrowing", "Pregnant", "PsychicBond", "PsychicBondTorn", "ResearchCommand", "Animal_Flu", "Stillborn"
"VatLearning", "VatGrowing", "Pregnant", "PsychicBond", "PsychicBondTorn", "ResearchCommand", "Animal_Flu", "Stillborn", "Animal_Plague"
};

public OptionsHealth GetOptions(CustomPawn pawn) {
Expand Down
9 changes: 3 additions & 6 deletions Source/TabViewPawns.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ public class TabViewPawns : TabViewBase {
public PanelAbilities PanelAbilities { get; set; }
public PanelScrollingContent PanelColumn1 { get; set; }
public PanelScrollingContent PanelColumn2 { get; set; }
//public PanelModuleAge PanelAge { get; set; }
public PanelTitles PanelTitles { get; set; }

public TabViewPawns(bool largeUI) {
Expand Down Expand Up @@ -57,7 +56,6 @@ protected void InitializePanels(bool largeUI) {
PanelAbilities = new PanelAbilities();
PanelAge = new PanelAge();
PanelXenotype = new PanelXenotype();
//PanelAge = new PanelModuleAge();
PanelTitles = new PanelTitles();
if (largeUI) {
TwoColumnLayout();
Expand Down Expand Up @@ -185,10 +183,9 @@ protected override void Resize(Rect rect) {
float x = PanelColonyPawns.PanelRect.xMax + panelMargin.x;
float top = PanelRandomize.PanelRect.yMax + panelMargin.y;

// Age and Appearance
// Appearance
float columnSize1 = 226;
PanelAppearance.Resize(new Rect(PanelColonyPawns.PanelRect.xMax + panelMargin.x, PanelRandomize.PanelRect.yMax + panelMargin.y, columnSize1, 414));
//PanelAppearance.Resize(new Rect(x, top, columnSize1, 490));
PanelAppearance.Resize(new Rect(PanelColonyPawns.PanelRect.xMax + panelMargin.x, PanelRandomize.PanelRect.yMax + panelMargin.y, columnSize1, 526));
x += columnSize1 + panelMargin.x;

float columnSize2 = 304;
Expand All @@ -204,7 +201,7 @@ protected override void Resize(Rect rect) {
float columnSize3 = 218;
PanelSkills.Resize(new Rect(x, top, columnSize3, 362));
PanelIncapable.Resize(new Rect(PanelSkills.PanelRect.xMin, PanelSkills.PanelRect.yMax + panelMargin.y,
columnSize3, 116));
columnSize3, 152));
}

public void ResizeTabView() {
Expand Down

0 comments on commit 75dd732

Please sign in to comment.