Input/Output Properties Panel
Added methods for properties that allow reading and writing
This commit is contained in:
parent
50a8059ed4
commit
87ebb18c0b
15 changed files with 2650 additions and 475 deletions
|
|
@ -12,7 +12,7 @@ namespace UniRx.Examples
|
|||
// Open Sample12Scene. Set from canvas
|
||||
public Button MyButton;
|
||||
public Toggle MyToggle;
|
||||
public InputField MyInput;
|
||||
public UnityEngine.UI.InputField MyInput;
|
||||
public Text MyText;
|
||||
public Slider MySlider;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace UniRx.Examples
|
|||
{
|
||||
// Open Sample13Scene. Set from canvas
|
||||
public Text Title;
|
||||
public InputField ToDoInput;
|
||||
public UnityEngine.UI.InputField ToDoInput;
|
||||
public Button AddButton;
|
||||
public Button ClearButton;
|
||||
public GameObject TodoList;
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ namespace UniRx
|
|||
}
|
||||
|
||||
/// <summary>Observe onEndEdit(Submit) event.</summary>
|
||||
public static IObservable<string> OnEndEditAsObservable(this InputField inputField)
|
||||
public static IObservable<string> OnEndEditAsObservable(this UnityEngine.UI.InputField inputField)
|
||||
{
|
||||
return inputField.onEndEdit.AsObservable();
|
||||
}
|
||||
|
|
@ -86,9 +86,9 @@ namespace UniRx
|
|||
#if !(UNITY_4_6 || UNITY_4_7 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2)
|
||||
[Obsolete("onValueChange has been renamed to onValueChanged")]
|
||||
#endif
|
||||
public static IObservable<string> OnValueChangeAsObservable(this InputField inputField)
|
||||
public static IObservable<string> OnValueChangeAsObservable(this UnityEngine.UI.InputField inputField)
|
||||
{
|
||||
return Observable.CreateWithState<string, InputField>(inputField, (i, observer) =>
|
||||
return Observable.CreateWithState<string, UnityEngine.UI.InputField>(inputField, (i, observer) =>
|
||||
{
|
||||
observer.OnNext(i.text);
|
||||
#if (UNITY_4_6 || UNITY_4_7 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2)
|
||||
|
|
@ -101,9 +101,9 @@ namespace UniRx
|
|||
|
||||
#if !(UNITY_4_6 || UNITY_4_7 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2)
|
||||
/// <summary>Observe onValueChanged with current `text` value on subscribe.</summary>
|
||||
public static IObservable<string> OnValueChangedAsObservable(this InputField inputField)
|
||||
public static IObservable<string> OnValueChangedAsObservable(this UnityEngine.UI.InputField inputField)
|
||||
{
|
||||
return Observable.CreateWithState<string, InputField>(inputField, (i, observer) =>
|
||||
return Observable.CreateWithState<string, UnityEngine.UI.InputField>(inputField, (i, observer) =>
|
||||
{
|
||||
observer.OnNext(i.text);
|
||||
return i.onValueChanged.AsObservable().Subscribe(observer);
|
||||
|
|
|
|||
Loading…
Reference in a new issue