static Main() { var harmony = HarmonyInstance.Create("humanlike.life.stages"); harmony.PatchAll(Assembly.GetExecutingAssembly()); Log.Message("Welcome to Human Life Stages"); DefGenerator_GenerateImpliedDefs_PreResolve.Postfix(); }
public static void aliens(this SettingsUIMod that, Rect inRect) { if (SettingsUIMod.def == null) { SettingsUIMod.def = DefGenerator_GenerateImpliedDefs_PreResolve.HumanoidRaces().ToList(); } ThingDef currentDef = SettingsUIMod.def[SettingsUIMod.current]; var clicked = Widgets.ButtonText( inRect.TopHalf().TopHalf().TopHalf().TopHalf().LeftHalf().ContractedBy(4f), "Back" ); var previous = Widgets.ButtonText( inRect.TopHalf().TopHalf().TopHalf().TopHalf().RightHalf().LeftPart(.1f), "<" ); Widgets.Label( inRect.TopHalf().TopHalf().TopHalf().TopHalf().RightHalf().ScaledBy(.8f), currentDef.label ); var next = Widgets.ButtonText( inRect.TopHalf().TopHalf().TopHalf().TopHalf().RightHalf().RightPart(.1f), ">" ); var rect = inRect.BottomPart(.92f).ContractedBy(4f); that.RenderOptions(currentDef, rect, previous || next); if (previous) { SettingsUIMod.current--; } else if (next) { SettingsUIMod.current++; } var defCount = SettingsUIMod.def.Count; SettingsUIMod.current += defCount; SettingsUIMod.current %= defCount; if (clicked) { that.Page = Page.l1; } }