123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- using System;
- using UnityEngine;
- public class OnaholeNodeSlider : MonoBehaviour, IOnaholeNodeButton
- {
- public string text
- {
- get
- {
- return this.textLabel.text;
- }
- set
- {
- this.textLabel.text = ((!string.IsNullOrEmpty(value)) ? value : string.Empty);
- }
- }
- public string uniqueName { get; set; }
- public OnaholeNodeButton.SelectType selectType
- {
- get
- {
- return this.selectType_;
- }
- set
- {
- this.selectType_ = value;
- if (value == OnaholeNodeButton.SelectType.None)
- {
- this.bg.alpha = this.defaultBGAlpha;
- this.textLabel.color = Color.white;
- }
- else if (value == OnaholeNodeButton.SelectType.Focus)
- {
- this.bg.alpha = 1f;
- this.textLabel.color = Color.white;
- }
- else if (value == OnaholeNodeButton.SelectType.Select)
- {
- this.bg.alpha = 1f;
- this.textLabel.color = Color.yellow;
- }
- }
- }
- public float sliderValue
- {
- get
- {
- return (this.sliderData == null) ? 0f : this.sliderData.slider.value;
- }
- set
- {
- if (this.sliderData != null)
- {
- this.sliderData.slider.value = value;
- }
- }
- }
- public void Awake()
- {
- this.defaultBGAlpha = this.bg.alpha;
- this.selectType = OnaholeNodeButton.SelectType.None;
- }
- public void SetSliderType(OnaholeNodeSlider.SliderType type)
- {
- }
- private void Update()
- {
- }
- private void OnChangeSliderValue(AbstractSliderData obj)
- {
- obj.ChangeSliderValue();
- }
- GameObject IOnaholeNodeButton.get_gameObject()
- {
- return base.gameObject;
- }
- [SerializeField]
- private UIWidget bg;
- [SerializeField]
- private UILabel textLabel;
- [SerializeField]
- private UISlider valueSlider;
- private float defaultBGAlpha;
- private OnaholeNodeButton.SelectType selectType_;
- private AbstractSliderData sliderData;
- public enum SliderType
- {
- Sensitivity,
- HoleSync,
- HoleAutoSpeed,
- HoleAutoInsertStartPos,
- HoleAutoInsertEndPos,
- MaidSensitivity,
- ManAlpha
- }
- }
|