fix(ProfilePreview): Description overflow

This commit is contained in:
Yimura 2021-09-19 23:59:35 +02:00
parent a6f60fb0b5
commit d91819a49c
2 changed files with 30 additions and 28 deletions

View File

@ -21,27 +21,28 @@ namespace big
if (profile.share_code == g_vehicle_service->get_active_profile(profile.handling_hash))
ImGui::TextColored({ 0.1254f,0.8039f,0.3137f,1.f }, "Active");
ImGui::BeginGroup();
ImGui::BeginTable("table", 3, ImGuiTableFlags_SizingStretchProp);
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::Text("Name:");
ImGui::Text("Description:");
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
ImGui::TableNextColumn();
ImGui::Text(profile.name.c_str());
ImGui::TextWrapped(profile.description.c_str());
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
ImGui::TableNextColumn();
ImGui::Text("Share Code: %s", profile.share_code.c_str());
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::Text("Description:");
ImGui::TableNextColumn();
ImGui::TextWrapped(profile.description.c_str());
ImGui::TableNextColumn();
if (ImGui::Button("Load Profile"))
g_vehicle_service->set_handling_profile(profile);
ImGui::EndGroup();
ImGui::EndTable();
ImGui::Separator();
}

View File

@ -43,27 +43,28 @@ namespace big
if (profile.share_code == g_vehicle_service->get_active_profile(profile.handling_hash))
ImGui::TextColored({ 0.1254f,0.8039f,0.3137f,1.f }, "Active");
ImGui::BeginGroup();
ImGui::BeginTable("table", 3, ImGuiTableFlags_SizingStretchProp);
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::Text("Name:");
ImGui::Text("Description:");
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
ImGui::TableNextColumn();
ImGui::Text(profile.name.c_str());
ImGui::TextWrapped(profile.description.c_str());
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
ImGui::TableNextColumn();
ImGui::Text("Share Code: %s", profile.share_code.c_str());
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::Text("Description:");
ImGui::TableNextColumn();
ImGui::TextWrapped(profile.description.c_str());
ImGui::TableNextColumn();
if (ImGui::Button("Load Profile"))
g_vehicle_service->set_handling_profile(profile);
ImGui::EndGroup();
ImGui::EndTable();
}
break;