mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-27 04:35:34 +08:00
[feat] cursor will move into remote id input box automaticlly if the last input remote id does not exist
This commit is contained in:
@@ -154,6 +154,7 @@ int Render::ConnectionStatusWindow() {
|
|||||||
localization::ok[localization_language_index_].c_str()) ||
|
localization::ok[localization_language_index_].c_str()) ||
|
||||||
ImGui::IsKeyPressed(ImGuiKey_Enter)) {
|
ImGui::IsKeyPressed(ImGuiKey_Enter)) {
|
||||||
show_connection_status_window_ = false;
|
show_connection_status_window_ = false;
|
||||||
|
re_enter_remote_id_ = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,11 @@ int Render::RemoteWindow() {
|
|||||||
ImGui::SetNextItemWidth(IPUT_WINDOW_WIDTH);
|
ImGui::SetNextItemWidth(IPUT_WINDOW_WIDTH);
|
||||||
ImGui::SetWindowFontScale(1.0f);
|
ImGui::SetWindowFontScale(1.0f);
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 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(
|
bool enter_pressed = ImGui::InputText(
|
||||||
"##remote_id_", remote_id_display_, IM_ARRAYSIZE(remote_id_display_),
|
"##remote_id_", remote_id_display_, IM_ARRAYSIZE(remote_id_display_),
|
||||||
ImGuiInputTextFlags_CharsUppercase |
|
ImGuiInputTextFlags_CharsUppercase |
|
||||||
|
|||||||
@@ -305,6 +305,7 @@ class Render {
|
|||||||
bool show_confirm_delete_connection_ = false;
|
bool show_confirm_delete_connection_ = false;
|
||||||
bool delete_connection_ = false;
|
bool delete_connection_ = false;
|
||||||
bool remember_password_ = false;
|
bool remember_password_ = false;
|
||||||
|
bool re_enter_remote_id_ = false;
|
||||||
|
|
||||||
double copy_start_time_ = 0;
|
double copy_start_time_ = 0;
|
||||||
double regenerate_password_start_time_ = 0;
|
double regenerate_password_start_time_ = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user