Beispiel #1
0
 /// <summary>
 /// Image
 /// </summary>
 /// <param name="Binder"></param>
 /// <param name="image"></param>
 /// <param name="sourceName"></param>
 public static void BindingImage(this UIPanelBinder Binder, Image image, byte sourceName)
 {
     Binder.RegistValueChange <Sprite>(x => image.sprite = x, sourceName);
 }
Beispiel #2
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);
 }
Beispiel #3
0
 /// <summary>
 /// RawImage
 /// </summary>
 /// <param name="Binder"></param>
 /// <param name="rawImage"></param>
 /// <param name="sourceName"></param>
 public static void BindingRawImage(this UIPanelBinder Binder, RawImage rawImage, byte sourceName)
 {
     Binder.RegistValueChange <Texture>(x => rawImage.texture = x, sourceName);
 }
Beispiel #4
0
 /// <summary>
 /// 下拉框
 /// </summary>
 /// <param name="Binder"></param>
 /// <param name="button"></param>
 /// <param name="sourceName"></param>
 public static void BindingButton(this UIPanelBinder Binder, Button button, byte sourceName)
 {
     Binder.RegistEvent(button.onClick, sourceName);
 }
Beispiel #5
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);
 }
Beispiel #6
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);
 }
Beispiel #7
0
 /// <summary>
 /// 文本框
 /// </summary>
 /// <param name="Binder"></param>
 /// <param name="inputField"></param>
 /// <param name="sourceName"></param>
 public static void BindingText(this UIPanelBinder Binder, Text textComponent, byte sourceName)
 {
     Binder.RegistValueChange <string>(x => textComponent.text = x, sourceName);
 }
Beispiel #8
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);
 }