示例#1
0
        protected OptionsProperty <TProperty> DefineProperty <TProperty>(TProperty defaultValue, OptionsPropertyValidator <TProperty> validator = null)
        {
            var property = new OptionsProperty <TProperty>(defaultValue, validator);

            Properties.Add(property);
            return(property);
        }
示例#2
0
 public MiscelaneousOptions()
 {
     ServerSideLighting = new OptionsProperty <bool>(false);
     Language           = new OptionsProperty <string>(CultureInfo.InstalledUICulture.Name);
     MeshInRam          = new OptionsProperty <bool>(true);
     ObjectPools        = new OptionsProperty <bool>(true);
 }
示例#3
0
 public MiscelaneousOptions()
 {
     ServerSideLighting = new OptionsProperty <bool>(false);
     Language           = new OptionsProperty <string>("en_us");
     MeshInRam          = new OptionsProperty <bool>(true);
     ObjectPools        = new OptionsProperty <bool>(true);
 }
示例#4
0
 public VideoOptions()
 {
     RenderDistance = DefineRangedProperty(6, 2, 32);
     UseVsync       = DefineProperty(true);
     Fullscreen     = DefineProperty(false);
     GuiScale       = DefineRangedProperty(0, 0, 3);
     ChunkThreads   = DefineRangedProperty(Environment.ProcessorCount / 2, 1, Environment.ProcessorCount);
     MaxFramerate   = DefineRangedProperty(60, 1, 999);
     Brightness     = DefineRangedProperty(50, 0, 100);
 }
示例#5
0
        public VideoOptions()
        {
            RenderDistance = DefineRangedProperty(6, 2, 32);
            UseVsync       = DefineProperty(true);
            Fullscreen     = DefineProperty(false);
            GuiScale       = DefineRangedProperty(1, 0, 3);
            ChunkThreads   = DefineRangedProperty(Environment.ProcessorCount / 2, 1, Environment.ProcessorCount);
            MaxFramerate   = DefineRangedProperty(60, 1, 999);
            Brightness     = DefineRangedProperty(50, 0, 100);

            Antialiasing = DefineRangedProperty(8, 0, 16);

            LimitFramerate = DefineProperty(false);
            Minimap        = DefineProperty(false);
            Depthmap       = DefineProperty(false);
            Skybox         = DefineProperty(true);

            CustomSkins        = DefineProperty(true);
            ClientSideLighting = DefineProperty(true);
        }
示例#6
0
 public ControllerOptions()
 {
     LeftJoystickSensitivity  = DefineRangedProperty(200, 1, 400);
     RightJoystickSensitivity = DefineRangedProperty(200, 1, 400);
 }
示例#7
0
 public ResourceOptions()
 {
     PluginDirectory      = new OptionsProperty <string>(null);
     LoadedResourcesPacks = new OptionsProperty <string[]>(new string[0]);
 }
示例#8
0
 public NetworkOptions()
 {
     NetworkThreads    = DefineRangedProperty(Environment.ProcessorCount / 2, 1, Environment.ProcessorCount);
     InactivityTimeout = DefineProperty(8500L, (value, newValue) => newValue);
     ResendThreshold   = DefineProperty(10, (value, newValue) => newValue);
 }
示例#9
0
 public MiscelaneousOptions()
 {
     ServerSideLighting = new OptionsProperty <bool>(false);
     Language           = new OptionsProperty <string>("en_us");
 }
示例#10
0
 public MiscelaneousOptions()
 {
     ServerSideLighting = new OptionsProperty <bool>(false);
 }
示例#11
0
 internal OptionsPropertyAccessor(OptionsProperty <TProperty> property, OptionsPropertyChangedDelegate <TProperty> listenDelegate)
 {
     _property = property;
     _delegate = listenDelegate;
 }
示例#12
0
 public SoundOptions()
 {
     GlobalVolume       = DefineRangedProperty(1.0f, 0.0f, 1.0f);
     MusicVolume        = DefineRangedProperty(1.0f, 0.0f, 1.0f);
     SoundEffectsVolume = DefineRangedProperty(1.0f, 0.0f, 1.0f);
 }