scripts
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
|
||||
namespace UnityEngine.Experimental.UIElements
|
||||
{
|
||||
// Token: 0x02000353 RID: 851
|
||||
internal class TouchScreenTextEditor : TextEditor
|
||||
{
|
||||
// Token: 0x0600340E RID: 13326 RVA: 0x00053590 File Offset: 0x00051790
|
||||
public TouchScreenTextEditor(TextField textField)
|
||||
: base(textField)
|
||||
{
|
||||
this.secureText = string.Empty;
|
||||
}
|
||||
|
||||
// Token: 0x17000BDF RID: 3039
|
||||
// (get) Token: 0x0600340F RID: 13327 RVA: 0x000535A8 File Offset: 0x000517A8
|
||||
// (set) Token: 0x06003410 RID: 13328 RVA: 0x000535C4 File Offset: 0x000517C4
|
||||
public string secureText
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_SecureText;
|
||||
}
|
||||
set
|
||||
{
|
||||
string text = value ?? string.Empty;
|
||||
if (text != this.m_SecureText)
|
||||
{
|
||||
this.m_SecureText = text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06003411 RID: 13329 RVA: 0x000535FC File Offset: 0x000517FC
|
||||
public override EventPropagation HandleEvent(Event evt, VisualElement finalTarget)
|
||||
{
|
||||
base.SyncTextEditor();
|
||||
EventPropagation eventPropagation = EventPropagation.Continue;
|
||||
EventType type = evt.type;
|
||||
if (type == EventType.MouseDown)
|
||||
{
|
||||
eventPropagation = this.DoMouseDown();
|
||||
}
|
||||
base.UpdateScrollOffset();
|
||||
return eventPropagation;
|
||||
}
|
||||
|
||||
// Token: 0x06003412 RID: 13330 RVA: 0x00053640 File Offset: 0x00051840
|
||||
private EventPropagation DoMouseDown()
|
||||
{
|
||||
base.textField.TakeCapture();
|
||||
this.keyboardOnScreen = TouchScreenKeyboard.Open(string.IsNullOrEmpty(this.secureText) ? base.textField.text : this.secureText, TouchScreenKeyboardType.Default, true, this.multiline, !string.IsNullOrEmpty(this.secureText));
|
||||
return EventPropagation.Stop;
|
||||
}
|
||||
|
||||
// Token: 0x04000AFE RID: 2814
|
||||
private string m_SecureText;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user