private static void btnSetFundamentTID_Action(string id, Dialog dialog) { string clipboard = GUIUtility.systemCopyBuffer; var mode = thingIDRegex.IsMatch(clipboard) ? SetFundamentTIDDialog.Mode.PreviewNewFundament : SetFundamentTIDDialog.Mode.ThingIDNotInClipboard; var par = new SetFundamentTIDDialog.Params(mode, clipboard); CustomDialog.SwitchTo <SetFundamentTIDDialog>(par, dialog.hand(), dialog.tabName); }
private static void chkDynamic_Action(string id, Dialog dialog, bool value) { if (value) { var par = new SetFundamentTIDDialog.Params(SetFundamentTIDDialog.Mode.ConfirmCollision, Main.config.FundamentTID); CustomDialog.SwitchTo <SetFundamentTIDDialog>(par, dialog.hand(), dialog.tabName); } else { Main.config.Dynamic = false; Main.config.Save(); } }