yasirkula / UnitySimpleFileBrowser

A uGUI based runtime file browser for Unity 3D (draggable and resizable)
MIT License
819 stars 111 forks source link

标题栏的bug #14

Closed QQ648380421 closed 4 years ago

QQ648380421 commented 4 years ago

如果标题栏的路径很长,启动时设置默认路径,那么窗口显示时会隐藏后面的路径,这种体验感并不友好,我修改了下脚本解决了这个问题 pathInputField.text = m_currentPath; pathInputField.ActivateInputField(); pathInputField.Select(); StartCoroutine(MoveTextEnd_NextFrame());

IEnumerator MoveTextEnd_NextFrame() { yield return new WaitForEndOfFrame() ; pathInputField.MoveTextEnd(false);

    }
QQ648380421 commented 4 years ago

QQ截图20191118105024

yasirkula commented 4 years ago

I see. You are right. I'll try to include your bugfix in a future release. I won't use it as is, though, since the ActivateInputField and Select functions would prompt the on-screen keyboard on mobile devices.

QQ648380421 commented 4 years ago

Very good, will use frequently in the future, support your friend!

yasirkula commented 4 years ago

It doesn't seem possible to scroll the input field's text to the end without focusing on it first, I've tried changing caretPosition and/or calling MoveTextEnd. I don't think it is possible to resolve this issue without focusing on the input field using Unity's InputField class, so I'm closing this Issue.

BTW, your file browser looks really good!

QQ648380421 commented 4 years ago

It doesn't matter, in fact, this problem is not very serious, when the mouse move up, I add a hover prompt on the line, also can have the same effect