Use enum names in radio button list.

This commit is contained in:
Bartosz Taudul 2024-05-04 12:55:55 +02:00
parent 061b5c77ce
commit 4a7f6e0cc1
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -228,11 +228,11 @@ void View::DrawOptions()
ImGui::TextUnformatted( ICON_FA_RULER_HORIZONTAL " Zone name shortening" ); ImGui::TextUnformatted( ICON_FA_RULER_HORIZONTAL " Zone name shortening" );
ImGui::Indent(); ImGui::Indent();
ImGui::PushStyleVar( ImGuiStyleVar_FramePadding, ImVec2( 0, 0 ) ); ImGui::PushStyleVar( ImGuiStyleVar_FramePadding, ImVec2( 0, 0 ) );
ImGui::RadioButton( "Disabled", &ival, 0 ); ImGui::RadioButton( "Disabled", &ival, (uint8_t)ShortenName::Never );
ImGui::RadioButton( "Minimal length", &ival, 1 ); ImGui::RadioButton( "Minimal length", &ival, (uint8_t)ShortenName::Always );
ImGui::RadioButton( "Only normalize", &ival, 2 ); ImGui::RadioButton( "Only normalize", &ival, (uint8_t)ShortenName::OnlyNormalize );
ImGui::RadioButton( "As needed", &ival, 3 ); ImGui::RadioButton( "As needed", &ival, (uint8_t)ShortenName::NoSpace );
ImGui::RadioButton( "As needed + normalize", &ival, 4 ); ImGui::RadioButton( "As needed + normalize", &ival, (uint8_t)ShortenName::NoSpaceAndNormalize );
ImGui::PopStyleVar(); ImGui::PopStyleVar();
ImGui::Unindent(); ImGui::Unindent();
m_shortenName = (ShortenName)ival; m_shortenName = (ShortenName)ival;