mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-27 05:20:50 +00:00
ui: Make snapshot Replace button red
This commit is contained in:
parent
386a114c01
commit
487cc7f591
@ -804,10 +804,18 @@ void MainMenuSnapshotsView::Draw()
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
if (snapshot_with_create_name_exists) {
|
||||
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.8, 0, 0, 1));
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(1, 0, 0, 1));
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(1, 0, 0, 1));
|
||||
}
|
||||
if (ImGui::Button(snapshot_with_create_name_exists ? "Replace" : "Create", ImVec2(-FLT_MIN, 0))) {
|
||||
xemu_snapshots_save(m_search_buf.empty() ? NULL : m_search_buf.c_str(), NULL);
|
||||
ClearSearch();
|
||||
}
|
||||
if (snapshot_with_create_name_exists) {
|
||||
ImGui::PopStyleColor(3);
|
||||
}
|
||||
|
||||
if (snapshot_with_create_name_exists && ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("A snapshot with the name \"%s\" already exists. This button will overwrite the existing snapshot.", m_search_buf.c_str());
|
||||
|
Loading…
Reference in New Issue
Block a user