예제 #1
0
 /// <summary>
 /// 双选
 /// </summary>
 /// <param name="Binder"></param>
 /// <param name="toggle"></param>
 /// <param name="sourceName"></param>
 public static void BindingToggle(this UIPanelBinder Binder, Toggle toggle, byte sourceName)
 {
     Binder.RegistValueChange <bool>(x => toggle.isOn = x, sourceName);
     Binder.RegistValueEvent(toggle.onValueChanged, sourceName);
 }
예제 #2
0
 /// <summary>
 /// 滑动条
 /// </summary>
 /// <param name="Binder"></param>
 /// <param name="sliderComponent"></param>
 /// <param name="sourceName"></param>
 public static void BindingSlider(this UIPanelBinder Binder, Slider sliderComponent, byte sourceName)
 {
     Binder.RegistValueChange <float>(x => sliderComponent.value = x, sourceName);
     Binder.RegistValueEvent(sliderComponent.onValueChanged, sourceName);
 }
예제 #3
0
 /// <summary>
 /// 下拉框
 /// </summary>
 /// <param name="Binder"></param>
 /// <param name="dropdown"></param>
 /// <param name="sourceName"></param>
 public static void BindingDropdown(this UIPanelBinder Binder, Dropdown dropdown, byte sourceName)
 {
     Binder.RegistValueChange <int>(x => dropdown.value = x, sourceName);
     Binder.RegistValueEvent(dropdown.onValueChanged, sourceName);
 }
예제 #4
0
 /// <summary>
 /// 输入框
 /// </summary>
 /// <param name="Binder"></param>
 /// <param name="inputField"></param>
 /// <param name="sourceName"></param>
 public static void BindingInputField(this UIPanelBinder Binder, InputField inputField, byte sourceName)
 {
     Binder.RegistValueChange <string>(x => inputField.text = x, sourceName);
     Binder.RegistValueEvent(inputField.onValueChanged, sourceName);
 }