public override void Update() { isPopupShown = false; if (binding == null) { return; } valueChangingProp.Enable(binding); float step = 1.0f; if (binding != null) { internalValue[0] = binding.X.Value; internalValue[1] = binding.Y.Value; internalValue[2] = binding.Z.Value; step = Binding.X.Step / 10.0f; } if (Manager.NativeManager.DragFloat3EfkEx(id, internalValue, step, float.MinValue, float.MaxValue, float.MinValue, float.MaxValue, float.MinValue, float.MaxValue, "X:" + "%.3f", "Y:" + "%.3f", "Z:" + "%.3f")) { FixValueInternal(isActive); } var isActive_Current = Manager.NativeManager.IsItemActive(); Popup(); if (isActive && !isActive_Current) { FixValue(); } isActive = isActive_Current; if (binding.IsDynamicEquationEnabled) { Manager.NativeManager.Text(Resources.GetString("DynamicEq")); Manager.NativeManager.SameLine(); var nextParam = DynamicSelector.Select("", "", binding.DynamicEquation, false, false); if (binding.DynamicEquation != nextParam) { binding.SetDynamicEquation(nextParam); } Popup(); } valueChangingProp.Disable(); }
public static void SelectInComponent(string id, Data.Value.DynamicEquationReference reference) { Manager.NativeManager.Text(Resources.GetString("DynamicEq")); Manager.NativeManager.SameLine(); var nextParam = DynamicSelector.Select("", id, reference.Value, false, false); if (reference.Value != nextParam) { reference.SetValue(nextParam); } }
public override void Update() { isPopupShown = false; if (binding == null) { return; } valueChangingProp.Enable(binding); float step = 1.0f; if (binding != null) { internalValue[0] = binding.X.Value; internalValue[1] = binding.Y.Value; internalValue[2] = binding.Z.Value; step = Binding.X.Step / 10.0f; } if (Manager.NativeManager.DragFloat3EfkEx(id, internalValue, step, float.MinValue, float.MaxValue, float.MinValue, float.MaxValue, float.MinValue, float.MaxValue, "X:" + "%.3f", "Y:" + "%.3f", "Z:" + "%.3f")) { FixValueInternal(isActive); } var isActive_Current = Manager.NativeManager.IsItemActive(); Popup(); if (isActive && !isActive_Current) { FixValue(); } isActive = isActive_Current; if (binding.IsDynamicEquationEnabled) { DynamicSelector.SelectInComponent(id_d, binding.DynamicEquation); Popup(); } valueChangingProp.Disable(); }
public override void Update() { isPopupShown = false; if (binding == null) { return; } valueChangingProp.Enable(binding); float step = 1.0f; if (binding != null) { internalValue[0] = binding.X.Value; internalValue[1] = binding.Y.Value; internalValue[2] = binding.Z.Value; internalValue[3] = binding.W.Value; step = Binding.X.Step / 10.0f; } if (Manager.NativeManager.ColorEdit4(id, internalValue, swig.ColorEditFlags.HDR | swig.ColorEditFlags.Float)) { FixValueInternal(isActive); } var isActive_Current = Manager.NativeManager.IsItemActive(); Popup(); if (isActive && !isActive_Current) { FixValue(); } isActive = isActive_Current; if (binding.IsDynamicEquationEnabled) { DynamicSelector.SelectInComponent(id_d, binding.DynamicEquation); Popup(); } valueChangingProp.Disable(); }
public override void Update() { isPopupShown = false; if (binding == null) { return; } valueChangingProp.Enable(binding); internalValue[0] = binding.Value; if (Manager.NativeManager.DragFloat(id, internalValue, binding.Step / 10.0f, binding.RangeMin, binding.RangeMax)) { if (EnableUndo) { binding.SetValue(internalValue[0], isActive); } else { binding.SetValueDirectly(internalValue[0]); } } Popup(); var isActive_Current = Manager.NativeManager.IsItemActive(); if (isActive && !isActive_Current) { FixValue(); } isActive = isActive_Current; if (binding.IsDynamicEquationEnabled) { DynamicSelector.SelectInComponent(id_d, binding.DynamicEquation); if (Manager.NativeManager.IsItemHovered()) { DynamicEquationCodeTooltip.render(binding.DynamicEquation); } Popup(); } valueChangingProp.Disable(); }
public static void SelectMinInComponent(string id, Data.Value.DynamicEquationReference reference) { Manager.NativeManager.PushItemWidth(Manager.NativeManager.GetColumnWidth() - 60); Manager.NativeManager.Text(Resources.GetString("DynamicEq")); Manager.NativeManager.SameLine(); var nextParam = DynamicSelector.Select(Resources.GetString("Min"), id, reference.Value, false, false); if (reference.Value != nextParam) { reference.SetValue(nextParam); } Manager.NativeManager.PopItemWidth();; }
void Popup() { if (isPopupShown) { return; } if (Manager.NativeManager.BeginPopupContextItem(id_c)) { if (binding.CanSelectDynamicEquation) { DynamicSelector.Popup(id_c, binding.DynamicEquationMax, binding.DynamicEquationMin, binding.IsDynamicEquationEnabled); } if (binding.IsDynamicEquationEnabled) { // None } else { var txt_r_r1 = Resources.GetString("Gauss"); var txt_r_r2 = Resources.GetString("Range"); if (Manager.NativeManager.RadioButton(txt_r_r1 + id_r1, binding.DrawnAs == Data.DrawnAs.CenterAndAmplitude)) { binding.DrawnAs = Data.DrawnAs.CenterAndAmplitude; } Manager.NativeManager.SameLine(); if (Manager.NativeManager.RadioButton(txt_r_r2 + id_r2, binding.DrawnAs == Data.DrawnAs.MaxAndMin)) { binding.DrawnAs = Data.DrawnAs.MaxAndMin; } } Manager.NativeManager.EndPopup(); isPopupShown = true; } }
void Popup() { if (isPopupShown) { return; } if (Manager.NativeManager.BeginPopupContextItem(id_c)) { Functions.ShowReset(binding); if (binding.CanSelectDynamicEquation) { DynamicSelector.Popup(id_c, binding.DynamicEquation, binding.IsDynamicEquationEnabled); } Manager.NativeManager.EndPopup(); isPopupShown = true; } }
public static void SelectMaxInComponent(string id, Data.Value.DynamicEquationReference reference) { Manager.NativeManager.PushItemWidth(Manager.NativeManager.GetColumnWidth() - 48 * Manager.DpiScale); Manager.NativeManager.Text(Resources.GetString("DynamicEq")); Manager.NativeManager.SameLine(); var nextParam = DynamicSelector.Select(Resources.GetString("Max"), id, reference.Value, false, false); if (Manager.NativeManager.IsItemHovered()) { DynamicEquationCodeTooltip.Render(reference); } if (reference.Value != nextParam) { reference.SetValue(nextParam); } Manager.NativeManager.PopItemWidth();; }
public override void Update() { isPopupShown = false; if (binding == null) { return; } valueChangingProp.Enable(binding); float step = 1.0f; if (binding != null) { internalValue[0] = binding.X.Value; internalValue[1] = binding.Y.Value; internalValue[2] = binding.Z.Value; internalValue[3] = binding.W.Value; step = Binding.X.Step / 10.0f; } if (Manager.NativeManager.ColorEdit4(id, internalValue, swig.ColorEditFlags.HDR | swig.ColorEditFlags.Float)) { FixValueInternal(isActive); } var isActive_Current = Manager.NativeManager.IsItemActive(); Popup(); if (isActive && !isActive_Current) { FixValue(); } isActive = isActive_Current; if (binding.IsDynamicEquationEnabled) { Manager.NativeManager.Text(Resources.GetString("DynamicEq")); Manager.NativeManager.SameLine(); var nextParam = DynamicSelector.Select("", "", binding.DynamicEquation.Value, false, false); if (Manager.NativeManager.IsItemHovered()) { DynamicEquationCodeTooltip.render(binding.DynamicEquation); } if (binding.DynamicEquation.Value != nextParam) { binding.DynamicEquation.SetValue(nextParam); } Popup(); } valueChangingProp.Disable(); }
public override void Update() { isPopupShown = false; if (binding != null) { internalValue[0] = binding.Value; isInfinite[0] = binding.Infinite.Value; } valueChangingProp.Enable(binding); Manager.NativeManager.PushItemWidth(60); if (Manager.NativeManager.DragInt(id1, internalValue, binding.Value.Step, binding.Value.Min, binding.Value.Max)) { if (EnableUndo) { binding.Value.SetValue(internalValue[0], isActive); } else { binding.Value.SetValueDirectly(internalValue[0]); } } Popup(); Manager.NativeManager.PopItemWidth(); var isActive_Current = Manager.NativeManager.IsItemActive(); if (isActive && !isActive_Current) { FixValue(); } isActive = isActive_Current; Manager.NativeManager.SameLine(); var inf = Resources.GetString("Infinite"); if (Manager.NativeManager.Checkbox(inf + id2, isInfinite)) { if (EnableUndo) { binding.Infinite.SetValue(isInfinite[0]); } else { binding.Infinite.SetValueDirectly(isInfinite[0]); } } Popup(); if (binding.IsDynamicEquationEnabled) { DynamicSelector.SelectInComponent(id_d, binding.DynamicEquation); Popup(); } valueChangingProp.Disable(); }
public override void Update() { isPopupShown = false; if (binding == null) { return; } valueChangingProp.Enable(binding); float step = 1.0f; if (binding != null) { if (binding.DrawnAs == Data.DrawnAs.CenterAndAmplitude && !binding.IsDynamicEquationEnabled) { internalValue1[0] = binding.X.Center; internalValue1[1] = binding.Y.Center; internalValue1[2] = binding.Z.Center; internalValue2[0] = binding.X.Amplitude; internalValue2[1] = binding.Y.Amplitude; internalValue2[2] = binding.Z.Amplitude; } else { internalValue1[0] = binding.X.Min; internalValue1[1] = binding.Y.Min; internalValue1[2] = binding.Z.Min; internalValue2[0] = binding.X.Max; internalValue2[1] = binding.Y.Max; internalValue2[2] = binding.Z.Max; } step = Binding.X.Step / 10.0f; } var txt_r1 = string.Empty; var txt_r2 = string.Empty; if (binding.DrawnAs == Data.DrawnAs.CenterAndAmplitude && !binding.IsDynamicEquationEnabled) { txt_r1 = Resources.GetString("Mean"); txt_r2 = Resources.GetString("Deviation"); } else { txt_r1 = Resources.GetString("Max"); txt_r2 = Resources.GetString("Min"); } Manager.NativeManager.PushItemWidth(Manager.NativeManager.GetColumnWidth() - 60); if (Manager.NativeManager.DragFloat3EfkEx(id1, internalValue1, step, float.MinValue, float.MaxValue, float.MinValue, float.MaxValue, float.MinValue, float.MaxValue, "X:%.3f", "Y:%.3f", "Z:%.3f")) { if (EnableUndo) { if (binding.DrawnAs == Data.DrawnAs.CenterAndAmplitude && !binding.IsDynamicEquationEnabled) { binding.X.SetCenter(internalValue1[0], isActive); binding.Y.SetCenter(internalValue1[1], isActive); binding.Z.SetCenter(internalValue1[2], isActive); } else { binding.X.SetMin(internalValue1[0], isActive); binding.Y.SetMin(internalValue1[1], isActive); binding.Z.SetMin(internalValue1[2], isActive); } } else { throw new Exception("Not Implemented."); } } var isActive_Current = Manager.NativeManager.IsItemActive(); Popup(); Manager.NativeManager.SameLine(); Manager.NativeManager.Text(txt_r1); if (binding.IsDynamicEquationEnabled) { DynamicSelector.SelectMaxInComponent(id_d1, binding.DynamicEquationMax); if (Manager.NativeManager.IsItemHovered()) { DynamicEquationCodeTooltip.render(binding.DynamicEquationMax); } Popup(); } if (Manager.NativeManager.DragFloat3EfkEx(id2, internalValue2, step, float.MinValue, float.MaxValue, float.MinValue, float.MaxValue, float.MinValue, float.MaxValue, "X:" + "%.3f", "Y:" + "%.3f", "Z:" + "%.3f")) { if (EnableUndo) { if (binding.DrawnAs == Data.DrawnAs.CenterAndAmplitude && !binding.IsDynamicEquationEnabled) { binding.X.SetAmplitude(internalValue2[0], isActive); binding.Y.SetAmplitude(internalValue2[1], isActive); binding.Z.SetAmplitude(internalValue2[2], isActive); } else { binding.X.SetMax(internalValue2[0], isActive); binding.Y.SetMax(internalValue2[1], isActive); binding.Z.SetMax(internalValue2[2], isActive); } } else { throw new Exception("Not Implemented."); } } isActive_Current |= Manager.NativeManager.IsItemActive(); if (isActive && !isActive_Current) { FixValue(); } isActive = isActive_Current; Popup(); Manager.NativeManager.SameLine(); Manager.NativeManager.Text(txt_r2); if (binding.IsDynamicEquationEnabled) { DynamicSelector.SelectMinInComponent(id_d2, binding.DynamicEquationMin); if (Manager.NativeManager.IsItemHovered()) { DynamicEquationCodeTooltip.render(binding.DynamicEquationMin); } Popup(); } Manager.NativeManager.PopItemWidth(); valueChangingProp.Disable(); }
public override void Update() { isPopupShown = false; if (binding == null) { return; } if (binding != null) { if (binding.DrawnAs == Data.DrawnAs.CenterAndAmplitude) { internalValue[0] = binding.GetCenter(); internalValue[1] = binding.GetAmplitude(); } else { internalValue[0] = binding.GetMin(); internalValue[1] = binding.GetMax(); } } valueChangingProp.Enable(binding); var txt_r1 = string.Empty; var txt_r2 = string.Empty; var range_1_min = int.MinValue; var range_1_max = int.MaxValue; var range_2_min = int.MinValue; var range_2_max = int.MaxValue; if (binding.DrawnAs == Data.DrawnAs.CenterAndAmplitude) { txt_r1 = Resources.GetString("Mean"); txt_r2 = Resources.GetString("Deviation"); range_1_min = binding.ValueMin; range_1_max = binding.ValueMax; } else { txt_r1 = Resources.GetString("Min"); txt_r2 = Resources.GetString("Max"); range_1_min = binding.ValueMin; range_1_max = binding.ValueMax; range_2_min = binding.ValueMin; range_2_max = binding.ValueMax; } if (Manager.NativeManager.DragInt2EfkEx(id, internalValue, binding.Step, range_1_min, range_1_max, range_2_min, range_2_max, txt_r1 + ":" + "%.0f", txt_r2 + ":" + "%.0f")) { if (EnableUndo) { if (binding.DrawnAs == Data.DrawnAs.CenterAndAmplitude) { binding.SetCenter(internalValue[0], isActive); binding.SetAmplitude(internalValue[1], isActive); } else { binding.SetMin(internalValue[0], isActive); binding.SetMax(internalValue[1], isActive); } } else { throw new Exception("Not Implemented."); } } Popup(); if (binding.IsDynamicEquationEnabled) { DynamicSelector.SelectMaxInComponent(id_d1, binding.DynamicEquationMax); Popup(); } if (binding.IsDynamicEquationEnabled) { DynamicSelector.SelectMinInComponent(id_d2, binding.DynamicEquationMin); Popup(); } var isActive_Current = Manager.NativeManager.IsItemActive(); if (isActive && !isActive_Current) { FixValue(); } isActive = isActive_Current; Popup(); valueChangingProp.Disable(); }