[glass] NetworkTablesSetting: Allow disable of server option (#3227)

This commit is contained in:
Peter Johnson
2021-03-07 21:24:59 -08:00
committed by GitHub
parent fe341a16f5
commit 79d1bd6c8f
2 changed files with 7 additions and 1 deletions

View File

@@ -110,7 +110,7 @@ void NetworkTablesSettings::Update() {
bool NetworkTablesSettings::Display() {
static const char* modeOptions[] = {"Disabled", "Client", "Server"};
ImGui::Combo("Mode", m_pMode, modeOptions, 3);
ImGui::Combo("Mode", m_pMode, modeOptions, m_serverOption ? 3 : 2);
switch (*m_pMode) {
case 1:
ImGui::InputText("Team/IP", m_pServerTeam);