public void RenderTo() { GenericPopupBuilder pop = GenericPopupBuilder.Create("Skip Time?", "Choose when you want to resume playing."); pop.AddButton("now", NewClose, true, null); foreach (string t in BTTimeSkip_Main.Settings.SkipTo) { DateTime t2 = DateTime.Parse(t); if (state.GetDayDiff(t2) > 0) { pop.AddButton(t, delegate { RenderSkip(t2); }, true, null); } } pop.AddFader(new UIColorRef?(LazySingletonBehavior <UIManager> .Instance.UILookAndColorConstants.PopupBackfill), 0f, true); pop.Render(); }
public static void AdvanceTo(this SimGameState s, DateTime d, bool skipNews) { int days = s.GetDayDiff(d); s.AdvanceBy(days, skipNews); }