ui: Use stylized toggle for snapshot filter by title

This commit is contained in:
Matt Borgerson 2023-06-03 22:22:24 -07:00 committed by mborgerson
parent 458de1758a
commit 86cdc0a9ab
1 changed files with 4 additions and 1 deletions

View File

@ -929,7 +929,9 @@ void MainMenuSnapshotsView::Draw()
{
Load();
SectionTitle("Snapshots");
ImGui::Checkbox("Filter by current title", &g_config.general.snapshots.filter_current_game);
Toggle("Filter by current title", &g_config.general.snapshots.filter_current_game);
ImGui::InputTextWithHint("##search", "Search...", &m_search_buf, ImGuiInputTextFlags_CallbackEdit,
&MainMenuSnapshotsViewUpdateSearchBox, this);
@ -951,6 +953,7 @@ void MainMenuSnapshotsView::Draw()
ImGui::SetTooltip("A snapshot with the name \"%s\" already exists. This button will overwrite the existing snapshot.", m_search_buf.c_str());
}
for (int i = m_snapshots_len - 1; i >= 0; i--) {
if (g_config.general.snapshots.filter_current_game && m_extra_data[i].xbe_title_name &&
(strcmp(m_current_title_name, m_extra_data[i].xbe_title_name) != 0)) {