Merge branch 'dev_cyp1' into dev_combine
# Conflicts: # .gitignore # Assets/Scripts/Devices/Ble/Characteristic/C2RowerData.cs # Assets/Scripts/Scenes/MainController.cs
This commit is contained in:
commit
342740b740
13 files changed
+132
-109
No files matched your search
@@ -35,20 +35,29 @@ public class PFUISlider : MonoBehaviour
|
||||
});
|
||||
}
|
||||
public bool runCallback = false;
|
||||
private bool ondraging = false;
|
||||
public void SetValueChanged(System.Action<float> a)
|
||||
{
|
||||
this.ValueChangedHandler = a;
|
||||
slider = transform.GetComponent<Slider>();
|
||||
slider.onValueChanged.RemoveAllListeners();
|
||||
|
||||
UIManager.AddEvent(slider.gameObject, EventTriggerType.BeginDrag, (e) =>
|
||||
{
|
||||
ondraging = true;
|
||||
});
|
||||
|
||||
UIManager.AddEvent(slider.gameObject, EventTriggerType.EndDrag, (e) =>
|
||||
{
|
||||
ondraging = false;
|
||||
OnValueChanged();
|
||||
});
|
||||
|
||||
slider.onValueChanged.AddListener((f) =>
|
||||
{
|
||||
current = f;
|
||||
if(!ondraging)
|
||||
OnValueChanged();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user