fix: Disable IP and Port fields when TCP Client/Server are connected
This commit is contained in:
parent
c9a728c318
commit
d6ba41c2d9
@ -1906,6 +1906,9 @@ namespace hex::plugin::builtin {
|
||||
static std::mutex receiverMutex;
|
||||
|
||||
ImGui::Header("hex.builtin.tools.tcp_client_server.settings"_lang, true);
|
||||
|
||||
ImGui::BeginDisabled(client.isConnected());
|
||||
{
|
||||
ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x * 0.3F);
|
||||
ImGui::InputText("##ipAddress", ipAddress);
|
||||
ImGui::PopItemWidth();
|
||||
@ -1915,6 +1918,9 @@ namespace hex::plugin::builtin {
|
||||
ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x * 0.2F);
|
||||
ImGui::InputInt("##port", &port, 0, 0);
|
||||
ImGui::PopItemWidth();
|
||||
}
|
||||
ImGui::EndDisabled();
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x * 0.2F);
|
||||
@ -1991,9 +1997,13 @@ namespace hex::plugin::builtin {
|
||||
|
||||
ImGui::Header("hex.builtin.tools.tcp_client_server.settings"_lang, true);
|
||||
|
||||
ImGui::BeginDisabled(server.isActive());
|
||||
{
|
||||
ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x * 0.2F);
|
||||
ImGui::InputInt("##port", &port, 0, 0);
|
||||
ImGui::PopItemWidth();
|
||||
}
|
||||
ImGui::EndDisabled();
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user