Beispiel #1
0
        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;
                }
            };
        }
Beispiel #2
0
        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;
            };
        }
Beispiel #3
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;
            };
        }
Beispiel #4
0
        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;
            };
        }
Beispiel #5
0
        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;
            };
        }
Beispiel #6
0
        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;
            };
        }
Beispiel #7
0
        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;
            };
        }
Beispiel #8
0
        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;
            };
        }
Beispiel #9
0
        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;
            };
        }
Beispiel #10
0
 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);
        }
Beispiel #12
0
 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;
     };
 }
Beispiel #13
0
        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;
              }
            };
        }
Beispiel #14
0
 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;
     };
 }
Beispiel #15
0
 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;
     };
 }
Beispiel #16
0
 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;
     };
 }
Beispiel #17
0
 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;
     };
 }
Beispiel #18
0
 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;
     };
 }
Beispiel #19
0
        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);
        }
Beispiel #20
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;
     };
 }
Beispiel #21
0
 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);
 }