[nostalgia/core/studio] Make Edit Subsheet popup close on escape press
This commit is contained in:
@@ -87,6 +87,9 @@ void TileSheetEditorImGui::keyStateChanged(core::Key key, bool down) {
|
||||
if (!down) {
|
||||
return;
|
||||
}
|
||||
if (key == core::Key::Escape) {
|
||||
m_subsheetEditor.close();
|
||||
}
|
||||
auto pal = model()->pal();
|
||||
if (pal) {
|
||||
const auto colorCnt = pal->colors.size();
|
||||
@@ -427,4 +430,8 @@ void TileSheetEditorImGui::SubSheetEditor::draw() noexcept {
|
||||
}
|
||||
}
|
||||
|
||||
void TileSheetEditorImGui::SubSheetEditor::close() noexcept {
|
||||
m_show = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user