void CreateSunParameters(VBox vbox) { var table = CreateFramedTable(vbox, "Sun", 3, 2); var sunX = new ScaleEntry(table, 0, 1, _("_X:"), 150, 4, GetVariable <double>("sun_x"), 0.0, 1.0, 0.01, 0.1, 2); var sunY = new ScaleEntry(table, 0, 2, _("_Y:"), 150, 4, GetVariable <double>("sun_y"), 0.0, 1.0, 0.01, 0.1, 2); var sunShow = GetVariable <bool>("sun_show"); sunShow.ValueChanged += delegate { sunX.Sensitive = sunY.Sensitive = sunShow.Value; }; table.Attach(new GimpCheckButton(_("_Show sun"), sunShow), 0, 2, 3, 4); Preview.ButtonPressEvent += (sender, args) => { if (sunShow.Value) { var size = Preview.Size; sunX.Value = args.Event.X / size.Width; sunY.Value = args.Event.Y / size.Height; } }; }
void CreateInclinationEntry(Table table) { var entry = new ScaleEntry(table, 3, 2, _("I_nclination (-90 - 90):"), 150, 3, GetVariable <double>("inclination"), -90.0, 90.0, 1, 10.0, 0); _type.ValueChanged += delegate { entry.Sensitive = IsPlanet; }; }
void CreateSaturationEntry(Table table) { var entry = new ScaleEntry(table, 3, 3, _("Sa_turation:"), 150, 3, GetVariable <double>("saturation"), 0.0, Int32.MaxValue, 1.0, 8.0, 0); _type.ValueChanged += delegate { entry.Sensitive = IsPlanet; }; }
void CreateIceEntry(Table table) { var entry = new ScaleEntry(table, 3, 1, _("_Ice"), 150, 3, GetVariable <double>("ice_level"), 0.0, Double.MaxValue, 0.1, 1.0, 1); _type.ValueChanged += delegate { entry.Sensitive = IsPlanet; }; }
void CreateHourEntry(Table table) { var entry = new ScaleEntry(table, 0, 2, _("Ho_ur (0 - 24):"), 150, 3, GetVariable <double>("hour"), 0.0, 24.0, 0.1, 1.0, 0); _type.ValueChanged += delegate { entry.Sensitive = IsPlanet; }; }
void CreatePowerEntry(Table table) { var entry = new ScaleEntry(table, 3, 0, _("_Power:"), 150, 3, GetVariable <double>("power"), 0.0, Double.MaxValue, 0.1, 1.0, 1); _type.ValueChanged += delegate { entry.Sensitive = IsPlanet || IsClouds; }; }
void CreateGlaciersEntry(Table table) { var entry = new ScaleEntry(table, 0, 1, _("_Glaciers"), 150, 3, GetVariable <double>("glaciers"), 0.0, Double.MaxValue, 0.1, 1.0, 0); _type.ValueChanged += delegate { entry.Sensitive = IsPlanet; }; }
void CreateStarPercentageEntry(Table table) { var entry = new ScaleEntry(table, 0, 3, _("_Stars (0 - 100):"), 150, 3, GetVariable <double>("stars_fraction"), 1.0, 100.0, 1.0, 8.0, 0); _type.ValueChanged += delegate { entry.Sensitive = IsPlanet || IsStars; }; }
void CreateDimensionEntry(Table table) { var entry = new ScaleEntry(table, 0, 0, _("_Dimension (0.0 - 3.0):"), 150, 3, GetVariable <double>("dimension"), 0.0, 3.0, 0.1, 1.0, 1); _type.ValueChanged += delegate { entry.Sensitive = IsPlanet || IsClouds; }; }
void CreatePowerEntry(Table table) { var entry = new ScaleEntry(table, 3, 0, _("_Power:"), 150, 3, GetVariable<double>("power"), 0.0, Double.MaxValue, 0.1, 1.0, 1); _type.ValueChanged += delegate { entry.Sensitive = IsPlanet || IsClouds; }; }
public void DictionaryEntryLabelReturnsUserFriendlyString(string dictionaryOutput, string expected) { var actual = ScaleEntry.GetUserFriendlyLabel(dictionaryOutput); Assert.Equal(expected, actual); }
void CreateStarPercentageEntry(Table table) { var entry = new ScaleEntry(table, 0, 3, _("_Stars (0 - 100):"), 150, 3, GetVariable<double>("stars_fraction"), 1.0, 100.0, 1.0, 8.0, 0); _type.ValueChanged += delegate { entry.Sensitive = IsPlanet || IsStars; }; }
void CreateSunParameters(VBox vbox) { var table = CreateFramedTable(vbox, "Sun", 3, 2); var sunX = new ScaleEntry(table, 0, 1, _("_X:"), 150, 4, GetVariable<double>("sun_x"), 0.0, 1.0, 0.01, 0.1, 2); var sunY = new ScaleEntry(table, 0, 2, _("_Y:"), 150, 4, GetVariable<double>("sun_y"), 0.0, 1.0, 0.01, 0.1, 2); var sunShow = GetVariable<bool>("sun_show"); sunShow.ValueChanged += delegate { sunX.Sensitive = sunY.Sensitive = sunShow.Value; }; table.Attach(new GimpCheckButton(_("_Show sun"), sunShow), 0, 2, 3, 4); Preview.ButtonPressEvent += (sender, args) => { if (sunShow.Value) { var size = Preview.Size; sunX.Value = args.Event.X / size.Width; sunY.Value = args.Event.Y / size.Height; } }; }
void CreateInclinationEntry(Table table) { var entry = new ScaleEntry(table, 3, 2, _("I_nclination (-90 - 90):"), 150, 3, GetVariable<double>("inclination"), -90.0, 90.0, 1, 10.0, 0); _type.ValueChanged += delegate { entry.Sensitive = IsPlanet; }; }
void CreateIceEntry(Table table) { var entry = new ScaleEntry(table, 3, 1, _("_Ice"), 150, 3, GetVariable<double>("ice_level"), 0.0, Double.MaxValue, 0.1, 1.0, 1); _type.ValueChanged += delegate { entry.Sensitive = IsPlanet; }; }
void CreateHourEntry(Table table) { var entry = new ScaleEntry(table, 0, 2, _("Ho_ur (0 - 24):"), 150, 3, GetVariable<double>("hour"), 0.0, 24.0, 0.1, 1.0, 0); _type.ValueChanged += delegate { entry.Sensitive = IsPlanet; }; }
void CreateGlaciersEntry(Table table) { var entry = new ScaleEntry(table, 0, 1, _("_Glaciers"), 150, 3, GetVariable<double>("glaciers"), 0.0, Double.MaxValue, 0.1, 1.0, 0); _type.ValueChanged += delegate { entry.Sensitive = IsPlanet; }; }
void CreateDimensionEntry(Table table) { var entry = new ScaleEntry(table, 0, 0, _("_Dimension (0.0 - 3.0):"), 150, 3, GetVariable<double>("dimension"), 0.0, 3.0, 0.1, 1.0, 1); _type.ValueChanged += delegate { entry.Sensitive = IsPlanet || IsClouds; }; }
void CreateClosestEntryWidget(GimpTable table, Variable<int> closest, Variable<int> points) { _closestEntry = new ScaleEntry(table, 0, 2, _("C_lose to:"), 150, 3, closest, 1.0, points.Value, 1.0, 8.0, 0); }
void CreateSaturationEntry(Table table) { var entry = new ScaleEntry(table, 3, 3, _("Sa_turation:"), 150, 3, GetVariable<double>("saturation"), 0.0, Int32.MaxValue, 1.0, 8.0, 0); _type.ValueChanged += delegate { entry.Sensitive = IsPlanet; }; }
void CreateClosestEntryWidget(GimpTable table, Variable <int> closest, Variable <int> points) { _closestEntry = new ScaleEntry(table, 0, 2, _("C_lose to:"), 150, 3, closest, 1.0, points.Value, 1.0, 8.0, 0); }