This commit is contained in:
xingweizhu 2021-05-18 11:53:25 +08:00
Родитель 06c6cc7a92
Коммит a80075e12e
4 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -1,5 +1,5 @@
test_editors:
- version: 2019.4/china_unity/staging
- version: 51fe52edbb02
test_platforms:
- name: win
type: Unity::VM

Просмотреть файл

@ -1,4 +1,4 @@
UIWidgets copyright © 2020 Unity Technologies ApS
UIWidgets copyright © 2021 Unity Technologies ApS
Licensed under the Unity Companion License for Unity-dependent projects--see [Unity Companion License](http://www.unity3d.com/legal/licenses/Unity_Companion_License).

Просмотреть файл

@ -22,9 +22,9 @@ namespace Unity.UIWidgets.service {
public readonly char input;
public readonly TextInputAction? inputAction;
public RawInputKeyResponse(bool swallow, char input = '\0', TextInputAction? inputAction = null) {
public RawInputKeyResponse(bool swallow, int input = 0, TextInputAction? inputAction = null) {
this.swallow = swallow;
this.input = input;
this.input = (char) input;
this.inputAction = inputAction;
}
@ -35,7 +35,7 @@ namespace Unity.UIWidgets.service {
null);
}
public static readonly RawInputKeyResponse swallowResponse = new RawInputKeyResponse(true, '\0', null);
public static readonly RawInputKeyResponse swallowResponse = new RawInputKeyResponse(true, 0, null);
}
interface KeyboardDelegate : IDisposable {
@ -44,7 +44,7 @@ namespace Unity.UIWidgets.service {
void setEditingState(TextEditingValue value);
void setEditableSizeAndTransform(Dictionary<string, object> args);
void setStyle(Dictionary<string, object> args);
void setIMEPos(Offset imeGlobalPos);
@ -153,7 +153,7 @@ namespace Unity.UIWidgets.service {
_value = _value.deleteSelection(true);
}
}
else if (currentEvent.character != '\0') {
else if (currentEvent.character != 0) {
_value = _value.clearCompose();
char ch = currentEvent.character;
if (ch == '\r' || ch == 3) {

Просмотреть файл

@ -102,7 +102,7 @@ namespace Unity.UIWidgets.services {
public override void debugFillProperties(DiagnosticPropertiesBuilder properties) {
base.debugFillProperties(properties);
properties.add(new StringProperty("keyId", keyId.ToString().PadLeft(8, '\0'), showName: true));
properties.add(new StringProperty("keyId", keyId.ToString().PadLeft(8, (char)0), showName: true));
properties.add(new StringProperty("keyLabel", keyLabel, showName: true));
properties.add(new StringProperty("debugName", debugName, showName: true, defaultValue: null));
}