[feat] cursor will move into remote id input box automaticlly if the last input remote id does not exist

This commit is contained in:
dijunkun
2024-11-21 16:20:25 +08:00
parent cb17b7c8db
commit 4fea7d86e1
3 changed files with 7 additions and 0 deletions

View File

@@ -54,6 +54,11 @@ int Render::RemoteWindow() {
ImGui::SetNextItemWidth(IPUT_WINDOW_WIDTH);
ImGui::SetWindowFontScale(1.0f);
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f);
if (re_enter_remote_id_) {
ImGui::SetKeyboardFocusHere();
re_enter_remote_id_ = false;
memset(remote_id_display_, 0, sizeof(remote_id_display_));
}
bool enter_pressed = ImGui::InputText(
"##remote_id_", remote_id_display_, IM_ARRAYSIZE(remote_id_display_),
ImGuiInputTextFlags_CharsUppercase |