Menu Bar keyboard navigation improvements.

This commit is contained in:
Martín Lucas Golini
2024-04-14 16:44:16 -03:00
parent 16f4bea13e
commit 6461402e30
7 changed files with 100 additions and 17 deletions

View File

@@ -1,6 +1,6 @@
#include "pluginmanager.hpp"
#include "../filesystemlistener.hpp"
#include "plugin.hpp"
#include "pluginmanager.hpp"
#include <eepp/system/filesystem.hpp>
#include <eepp/ui/uicheckbox.hpp>
#include <eepp/ui/uitableview.hpp>
@@ -494,6 +494,11 @@ UIWindow* UIPluginManager::New( UISceneNode* sceneNode, PluginManager* manager,
plugin->removeReadyCallback( cb.second );
}
} );
win->on( Event::KeyDown, [win]( const Event* event ) {
const KeyEvent* kevent = event->asKeyEvent();
if ( kevent->getKeyCode() == EE::Window::KEY_ESCAPE )
win->close();
} );
win->center();
return win;
}