Пример #1
0
        private void slider_color_saturation_Feedback(object sender, SliderLabelArgs e)
        {
            int s = Utility.Clamp((int)(m_hsb_selected.s * 100f + 0.1f) + e.Increment, 0, 100);

            m_hsb_selected.s = (float)s / 100f;
            UpdateColorFromHSB();
            UpdateSlidersFromSelectedColor();
        }
Пример #2
0
        private void slider_color_hue_Feedback(object sender, SliderLabelArgs e)
        {
            int h = Utility.Clamp((int)(m_hsb_selected.h * 360f + 0.1f) + e.Increment, 0, 360);

            m_hsb_selected.h = (float)h / 360f;
            UpdateColorFromHSB();
            UpdateSlidersFromSelectedColor();
        }
Пример #3
0
        private void slider_color_brightness_Feedback(object sender, SliderLabelArgs e)
        {
            int b = Utility.Clamp((int)(m_hsb_selected.b * 100f + 0.1f) + e.Increment, 0, 100);

            m_hsb_selected.b = (float)b / 100f;
            UpdateColorFromHSB();
            UpdateSlidersFromSelectedColor();
        }
Пример #4
0
        private void slider_color_blue_Feedback(object sender, SliderLabelArgs e)
        {
            byte  B = (byte)Utility.Clamp(m_editor_colors[m_selected_color].B + e.Increment, 0, 255);
            Color c = m_editor_colors[m_selected_color];

            m_editor_colors[m_selected_color] = Color.FromArgb(c.R, c.G, B);
            UpdateHSBFromColor();
            UpdateSlidersFromSelectedColor();
            NotifyEditorColorUpdated(m_selected_color);
        }
Пример #5
0
 // NOTE: Z and Y are flipped on purpose (because of how decals are oriented vs. displayed)
 private void slider_light_posz_Feedback(object sender, SliderLabelArgs e)
 {
     if (m_selected_light >= 0 && m_dmesh != null)
     {
         DLight dl = m_dmesh.light[m_selected_light];
         dl.position.Y = Utility.SnapValue(dl.position.Y + e.Increment * POS_SNAP, POS_SNAP);
         UpdateLightProperties(dl);
         RefreshGeometry();
     }
 }
Пример #6
0
        public float ROT_SNAP = Utility.RAD_180 / 36f;         // 5 degrees

        private void slider_light_rot_yaw_Feedback(object sender, SliderLabelArgs e)
        {
            if (m_selected_light >= 0 && m_active_dmesh != null)
            {
                DLight dl = m_active_dmesh.light[m_selected_light];
                dl.rot_yaw = Utility.SnapValue(dl.rot_yaw + e.Increment * ROT_SNAP, ROT_SNAP);
                UpdateLightProperties(dl);
                gl_custom.Invalidate();
            }
        }
Пример #7
0
 private void slider_light_range_Feedback(object sender, SliderLabelArgs e)
 {
     if (m_selected_light >= 0 && m_active_dmesh != null)
     {
         DLight dl = m_active_dmesh.light[m_selected_light];
         dl.range = Utility.SnapValue(dl.range + e.Increment * 0.5f, 0.5f);
         dl.range = Utility.Clamp(dl.range, 0f, 50f);
         UpdateLightProperties(dl);
     }
 }
Пример #8
0
 private void slider_light_angle_Feedback(object sender, SliderLabelArgs e)
 {
     if (m_selected_light >= 0 && m_dmesh != null)
     {
         DLight dl = m_dmesh.light[m_selected_light];
         dl.angle = Utility.SnapValue(dl.angle + e.Increment * 5, 5f);
         dl.angle = Utility.Clamp(dl.angle, 0f, 160f);
         UpdateLightProperties(dl);
     }
 }
Пример #9
0
 private void slider_light_rot_pitch_Feedback(object sender, SliderLabelArgs e)
 {
     if (m_selected_light >= 0 && m_dmesh != null)
     {
         DLight dl = m_dmesh.light[m_selected_light];
         dl.rot_pitch = Utility.SnapValue(dl.rot_pitch + e.Increment * ROT_SNAP, ROT_SNAP);
         UpdateLightProperties(dl);
         RefreshGeometry();
     }
 }
Пример #10
0
 private void slider_light_intensity_Feedback(object sender, SliderLabelArgs e)
 {
     if (m_selected_light >= 0 && m_dmesh != null)
     {
         DLight dl  = m_dmesh.light[m_selected_light];
         float  inc = (dl.intensity < 2f ? 0.1f : 0.5f);
         dl.intensity = Utility.SnapValue(dl.intensity + e.Increment * inc, inc);
         dl.intensity = Utility.Clamp(dl.intensity, 0f, 50f);
         UpdateLightProperties(dl);
     }
 }
Пример #11
0
        private void slider_nudge_amount_Feedback(object sender, SliderLabelArgs e)
        {
            if (e.Increment > 0)
            {
                m_nudge_amount = Math.Min(1f, m_nudge_amount * 2f);
            }
            else
            {
                m_nudge_amount = Math.Max(1f / 128f, m_nudge_amount * 0.5f);
            }

            slider_nudge_amount.ValueText = Utility.ConvertFloatTo1Thru3Dec(m_nudge_amount);
        }
 private void slider_grid_snap_Feedback(object sender, SliderLabelArgs e)
 {
     if (e.Increment > 0)
     {
         GRID_SNAP = Math.Min(1f, GRID_SNAP * 2f);
     }
     else if (e.Increment < 0)
     {
         GRID_SNAP = Math.Max(1f / 64f, GRID_SNAP / 2f);
     }
     else
     {
         return;
     }
     GRID_SNAP = Utility.SnapValue(GRID_SNAP, 1f / 64f);
     UpdateOptionLabels();
 }
Пример #13
0
 private void slider_smooth_angle_same_Feedback(object sender, SliderLabelArgs e)
 {
     ChangeSmoothAngleSame(e.Increment * 5);
 }
Пример #14
0
 private void slider_sizesegments_Feedback(object sender, SliderLabelArgs e)
 {
     ChangeSizeSegments(e.Increment);
 }
Пример #15
0
 private void slider_sizeheight_Feedback(object sender, SliderLabelArgs e)
 {
     ChangeSizeHeight(e.Increment);
 }
Пример #16
0
 private void slider_grid_width_Feedback(object sender, SliderLabelArgs e)
 {
     ChangeGridWidth(e.Increment);
 }
Пример #17
0
 private void slider_extrude_length_Feedback(object sender, SliderLabelArgs e)
 {
     ChangeExtrudeLength(e.Increment);
 }
Пример #18
0
 private void slider_grid_snap_Feedback(object sender, SliderLabelArgs e)
 {
     ChangeGridSnap(e.Increment);
 }
Пример #19
0
 private void slider_grid_spacing_Feedback(object sender, SliderLabelArgs e)
 {
     ChangeGridSpacing(e.Increment);
 }
Пример #20
0
 private void slider_coplanar_angle_Feedback(object sender, SliderLabelArgs e)
 {
     ChangeCoplanarAngle(e.Increment * 5);
 }
Пример #21
0
 private void slider_bevel_width_Feedback(object sender, SliderLabelArgs e)
 {
     ChangeBevelWidth(e.Increment);
 }
Пример #22
0
 private void slider_inset_bevel_Feedback(object sender, SliderLabelArgs e)
 {
     ChangeInsetPct(e.Increment);
 }
 private void slider_deformation_height_Feedback(object sender, SliderLabelArgs e)
 {
     ActiveDocument.ChangeSideDeformationHeight(e.Increment);
 }
Пример #24
0
 private void slider_decal_offset_v_Feedback(object sender, SliderLabelArgs e)
 {
     ActiveDocument.ChangeDecalOffset(0, e.Increment);
 }
 private void slider_cave_simplify_Feedback(object sender, SliderLabelArgs e)
 {
     ActiveDocument.ChangeCaveSimplify(e.Increment);
 }
 private void slider_rotate_angle_Feedback(object sender, SliderLabelArgs e)
 {
     ActiveDocument.ChangeRotateAngle(e.Increment * 5);
 }
Пример #27
0
 private void slider_decal_repeat_u_Feedback(object sender, SliderLabelArgs e)
 {
     ActiveDocument.ChangeDecalRepeat(e.Increment, 0);
 }
Пример #28
0
 private void slider_inset_length_Feedback(object sender, SliderLabelArgs e)
 {
     ChangeInsetLength(e.Increment);
 }
Пример #29
0
 private void slider_decal_rotation_Feedback(object sender, SliderLabelArgs e)
 {
     ActiveDocument.ChangeDecalRotation(e.Increment);
 }
 private void sliderLabelDark_Feedback(object sender, SliderLabelArgs e)
 {
     ActiveDocument.ToggleDark();
 }