Add a File->Close option
This commit is contained in:
@@ -167,6 +167,9 @@ bool EmulatorWindow::Initialize() {
|
||||
file_menu->AddChild(
|
||||
MenuItem::Create(MenuItem::Type::kString, L"&Open", L"Ctrl+O",
|
||||
std::bind(&EmulatorWindow::FileOpen, this)));
|
||||
file_menu->AddChild(
|
||||
MenuItem::Create(MenuItem::Type::kString, L"Close",
|
||||
std::bind(&EmulatorWindow::FileClose, this)));
|
||||
file_menu->AddChild(MenuItem::Create(MenuItem::Type::kString, L"E&xit",
|
||||
L"Alt+F4",
|
||||
[this]() { window_->Close(); }));
|
||||
@@ -304,6 +307,12 @@ void EmulatorWindow::FileOpen() {
|
||||
}
|
||||
}
|
||||
|
||||
void EmulatorWindow::FileClose() {
|
||||
if (emulator_->is_title_open()) {
|
||||
emulator_->TerminateTitle();
|
||||
}
|
||||
}
|
||||
|
||||
void EmulatorWindow::CheckHideCursor() {
|
||||
if (!window_->is_fullscreen()) {
|
||||
// Only hide when fullscreen.
|
||||
|
||||
Reference in New Issue
Block a user