From 479f9535b43fdc528539a632413e35e415007924 Mon Sep 17 00:00:00 2001 From: scrawl <720642+scrawl@users.noreply.github.com> Date: Sun, 8 Oct 2017 20:38:20 +0000 Subject: [PATCH] Allow training window exit() --- apps/openmw/mwgui/trainingwindow.cpp | 6 ++++++ apps/openmw/mwgui/trainingwindow.hpp | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwgui/trainingwindow.cpp b/apps/openmw/mwgui/trainingwindow.cpp index b6504d223..04b051e16 100644 --- a/apps/openmw/mwgui/trainingwindow.cpp +++ b/apps/openmw/mwgui/trainingwindow.cpp @@ -203,4 +203,10 @@ namespace MWGui checkReferenceAvailable(); mTimeAdvancer.onFrame(dt); } + + bool TrainingWindow::exit() + { + return !mTimeAdvancer.isRunning(); + } + } diff --git a/apps/openmw/mwgui/trainingwindow.hpp b/apps/openmw/mwgui/trainingwindow.hpp index 69a013059..2edad1f27 100644 --- a/apps/openmw/mwgui/trainingwindow.hpp +++ b/apps/openmw/mwgui/trainingwindow.hpp @@ -16,7 +16,7 @@ namespace MWGui virtual void onOpen(); - bool exit() { return false; } + bool exit(); void setPtr(const MWWorld::Ptr& actor);