浏览代码

fix editable_text

/siyaoH-1.17-PlatformMessage
Shiyun Wen 4 年前
当前提交
e8bfce52
共有 2 个文件被更改,包括 48 次插入2 次删除
  1. 48
      com.unity.uiwidgets/Runtime/widgets/editable_text.cs
  2. 2
      Samples/UIWidgetsSamples_2019_4/Unity.UIWidgets.csproj.DotSettings

48
com.unity.uiwidgets/Runtime/widgets/editable_text.cs


_strutStyle = strutStyle;
inputFormatters = inputFormatters ?? new List<TextInputFormatter>();
keyboardType = keyboardType ?? (maxLines == 1 ? TextInputType.text : TextInputType.multiline);
List<TextInputFormatter> formatters = new List<TextInputFormatter>();
if (inputFormatters == null) {
formatters = inputFormatters;
}
BlacklistingTextInputFormatter.singleLineFormatter,
inputFormatters
BlacklistingTextInputFormatter.singleLineFormatter,
if (maxLines == 1) {
foreach (var formatter in formatters) {
inputFormatters.Add(formatter);
}
}
this.readOnly = readOnly;
this.showCursor = showCursor ?? !readOnly;
this.keyboardType = keyboardType ?? (maxLines == 1 ? TextInputType.text : TextInputType.multiline);

public RawInputKeyResponse globalInputKeyHandler(RawKeyEvent evt) {
return widget.globalKeyEventHandler?.Invoke(evt, true) ?? RawInputKeyResponse.convert(evt);
}
public TextEditingValue currentTextEditingValue {
get {
return _value;
}
}
public void connectionClosed() {
if (_hasInputConnection) {
_textInputConnection.connectionClosedReceived();
_textInputConnection = null;
_lastFormattedUnmodifiedTextEditingValue = null;
_receivedRemoteTextEditingValue = null;
_finalizeEditing(true);
}
}
void _onFloatingCursorResetTick() {

_scrollController.jumpTo(
_getScrollOffsetForCaret(renderEditable.getLocalRectForCaret(position)));
}
public bool cutEnabled {
get { return widget.toolbarOptions.cut && !widget.readOnly; }
}
public bool copyEnabled {
get {
return widget.toolbarOptions.copy;
}
}
public bool pasteEnabled {
get {
return widget.toolbarOptions.paste && !widget.readOnly;
}
}
public bool selectAllEnabled {
get {
return widget.toolbarOptions.selectAll;
}
}
public void toggleToolbar() {
D.assert(_selectionOverlay != null);
if (_selectionOverlay.toolbarIsVisible) {

2
Samples/UIWidgetsSamples_2019_4/Unity.UIWidgets.csproj.DotSettings


<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/CSharpLanguageProject/LanguageLevel/@EntryValue">Experimental</s:String></wpf:ResourceDictionary>
正在加载...
取消
保存