浏览代码

Update editable text.

/main
Yuncong Zhang 6 年前
当前提交
bea52214
共有 1 个文件被更改,包括 2 次插入5 次删除
  1. 7
      Runtime/widgets/editable_text.cs

7
Runtime/widgets/editable_text.cs


}
public bool cursorCurrentlyVisible {
get { return this._cursorVisibilityNotifier.value; }
get { return this._cursorBlinkOpacityController.value > 0; }
}
public TimeSpan cursorBlinkInterval {

int _obscureLatestCharIndex;
void _cursorTick() {
this._targetCursorVisibility = !this._targetCursorVisibility;
this._targetCursorVisibility = !this._unityKeyboard() && !this._targetCursorVisibility;
float targetOpacity = this._targetCursorVisibility ? 1.0f : 0.0f;
if (this.widget.cursorOpacityAnimates) {
this._cursorBlinkOpacityController.animateTo(targetOpacity, curve: Curves.easeOut);

}
this._cursorVisibilityNotifier.value = !this._unityKeyboard() && !this._cursorVisibilityNotifier.value;
if (this._obscureShowCharTicksPending > 0) {
this.setState(() => { this._obscureShowCharTicksPending--; });
}

void _startCursorTimer() {
this._targetCursorVisibility = true;
this._cursorBlinkOpacityController.setValue(1.0f);
this._cursorVisibilityNotifier.value = !this._unityKeyboard();
if (EditableText.debugDeterministicCursor) {
return;
}

this._cursorTimer = null;
this._targetCursorVisibility = false;
this._cursorBlinkOpacityController.setValue(0.0f);
this._cursorVisibilityNotifier.value = false;
if (EditableText.debugDeterministicCursor) {
return;
}

正在加载...
取消
保存