Allow closing the History window with the upper right button

This commit is contained in:
Stepland 2022-10-11 20:32:20 +02:00
parent 8f58f79aa6
commit 481f732bc2
2 changed files with 3 additions and 3 deletions

View File

@ -63,8 +63,8 @@ public:
}
}
void display() {
if (ImGui::Begin("History")) {
void display(bool& show) {
if (ImGui::Begin("History", &show)) {
for (auto it = next_actions.crbegin(); it != next_actions.crend(); ++it) {
ImGui::TextUnformatted((*it)->get_message().c_str());
if (*last_saved_action == *it) {

View File

@ -438,7 +438,7 @@ int main() {
window.clear(sf::Color(0, 0, 0));
if (editor_state->showHistory) {
editor_state->chart_state->history.display();
editor_state->chart_state->history.display(editor_state->showHistory);
}
if (editor_state->showPlayfield) {
editor_state->display_playfield(marker, markerEndingState);