[nostalgia/core/studio] Add unsaved changes indicator to editor tabs
This commit is contained in:
parent
0375f4b785
commit
3fd25782c0
@ -183,7 +183,8 @@ void StudioUI::drawTabs() noexcept {
|
|||||||
for (auto it = m_editors.begin(); it != m_editors.end();) {
|
for (auto it = m_editors.begin(); it != m_editors.end();) {
|
||||||
auto const &e = *it;
|
auto const &e = *it;
|
||||||
auto open = true;
|
auto open = true;
|
||||||
if (ImGui::BeginTabItem(e->itemDisplayName().c_str(), &open)) {
|
const auto flags = e->unsavedChanges() ? ImGuiTabItemFlags_UnsavedDocument : 0;
|
||||||
|
if (ImGui::BeginTabItem(e->itemDisplayName().c_str(), &open, flags)) {
|
||||||
m_acitveEditor = e.get();
|
m_acitveEditor = e.get();
|
||||||
e->draw(m_ctx);
|
e->draw(m_ctx);
|
||||||
ImGui::EndTabItem();
|
ImGui::EndTabItem();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user