private static void InitBefore() { RenderDebugText = new BoolSwitch(false, 30); RenderHitboxes = new BoolSwitch(false, 30); FluidManager.Init(); LogicManager.Init(); }
public void RegistNewSetter(SakuraCore.SPropertyData property) { ISPropertyInterface newset; switch (property.PropType) { case "bool": { newset = new BoolSwitch() as ISPropertyInterface; break; } case "float": { newset = new FloatSet() as ISPropertyInterface; break; } case "const SVector&": case "SVector": case "structSakuraMath::SVector": { newset = new SVectorSet() as ISPropertyInterface; break; } case "const std::string&": case "std::string": case "string": case "std:string": { newset = new StringSet() as ISPropertyInterface; break; } default: { // Containers if (SakuraCore.PropIsContainer(property)) { RegistContainer(property); return; } else { // newset = RegistSubMember(property); break; } } } newset.Initialize(property); PropertySetters.Add(newset); DetailsDock.Children.Add(newset as UserControl); (newset as UserControl).SetValue(DockPanel.DockProperty, Dock.Top); }
static RpxInterface() { Title = Strings.App_Title + " " + typeof(Program).Assembly.GetName().Version.ToString(); Parser = new ArgumentParser("Rpx", Title + "\n" + Strings.App_AboutText); Parser.AboutTitleText = Title; Parser.AboutText = Strings.App_AboutText; Parser.AboutTextLong = Strings.App_AboutTextLong; Parser.CreditsText = Strings.App_CreditsText; Parser.LegalText = Strings.App_LegalText; Parser.HasApplicationDocument = true; PathString = new StringArgument(Strings.Arg_PathString_Name, Strings.Arg_PathString_ShortHelp, Strings.Arg_PathString_Help); FileList = new StringListArgument(Strings.Arg_FileList_Name, "", Strings.Arg_FileList_Help); Parser.FirstArgument = PathString; Parser.DefaultArgument = FileList; AssemblyInfoPath = new StringArgument(Strings.Arg_AssemblyInfoPath_Name, Strings.Arg_AssemblyInfoPath_ShortHelp, Strings.Arg_AssemblyInfoPath_Help); IconPath = new StringArgument(Strings.Arg_IconPath_Name, Strings.Arg_IconPath_ShortHelp, Strings.Arg_IconPath_Help); OutputPath = new StringArgument(Strings.Arg_OutputPath_Name, Strings.Arg_OutputPath_ShortHelp, Strings.Arg_OutputPath_Help); ConsoleSwitch = new PlusMinusSwitch(Strings.Arg_ConsoleSwitch_ShortHelp, Strings.Arg_ConsoleSwitch_Help, true); PassArgsSwitch = new BoolSwitch(Strings.Arg_PassArgsSwitch_ShortHelp, Strings.Arg_PassArgsSwitch_Help); DecorateSwitch = new BoolSwitch(Strings.Arg_Decorate_ShortHelp, Strings.Arg_Decorate_Help); ProtectZipSwitch = new OptionalStringArgument(Strings.Arg_Hide_Name, Strings.Arg_Hide_ShortHelp, Strings.Arg_Hide_Help); ToolsCsv = new CsvArgument(Strings.Arg_Toolkit_Name, Strings.Arg_Toolkit_ShortHelp, Strings.Arg_Toolkit_Help); Parser.Add(PlusMinusSwitch.KeyPrefix, Strings.Arg_ConsoleSwitch_Symbol, Strings.Arg_ConsoleSwitch_Key, ConsoleSwitch); Parser.Add("/", Strings.Arg_PassArgsSwitch_Symbol, Strings.Arg_PassArgsSwitch_Key, PassArgsSwitch); Parser.Add("/", Strings.Arg_Toolkit_Key, ToolsCsv); Parser.Add("/", Strings.Arg_OutputPath_Symbol, Strings.Arg_OutputPath_Key, OutputPath); Parser.Add("/", Strings.Arg_Decorate_Key, DecorateSwitch); Parser.Add("/", Strings.Arg_IconPath_Symbol, Strings.Arg_IconPath_Key, IconPath); Parser.Add("/", Strings.Arg_AssemblyInfoPath_Symbol, Strings.Arg_AssemblyInfoPath_Key, AssemblyInfoPath); Parser.Add("/", Strings.Arg_Hide_Key, ProtectZipSwitch); BuildSwitch = new BoolSwitch(Strings.Arg_BuildSwitch_ShortHelp, Strings.Arg_BuildSwitch_Help); QuietSwitch = new BoolSwitch(Strings.Arg_QuietSwitch_ShortHelp, Strings.Arg_QuietSwitch_Help); VerboseSwitch = new EnumSwitch(Strings.Arg_Verbose_ShortHelp, Strings.Arg_Verbose_Help, typeof(ConsoleVerbosity)); Parser.Add("/", Strings.Arg_BuildSwitch_Key, BuildSwitch); Parser.Add("/", Strings.Arg_QuietSwitch_Key, QuietSwitch); Parser.Add("/", Strings.Arg_Verbose_Key, VerboseSwitch); WarningsAsErrors = new PlusMinusSwitch(Strings.Arg_WarningsAsErrors_ShortHelp, Strings.Arg_WarningsAsErrors_Help, false); Parser.Add(PlusMinusSwitch.KeyPrefix, Strings.Arg_WarningsAsErrors_Key, WarningsAsErrors); }
public SwitchAttribs() : base(delegate() { return(RawItem.Switch); }) { poweroutL.max = poweroutR.max = poweroutU.max = poweroutD.max = src.max; state = new BoolSwitch(false); }