Back to previous resolution when escape was pressed in confirm resolution dialog
This commit is contained in:
parent
3ef30dfd48
commit
ad870c37f4
@ -64,6 +64,15 @@ void ConfirmResolutionDialog::onUpdate(float dt)
|
||||
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
bool ConfirmResolutionDialog::onEscapePressed()
|
||||
{
|
||||
ModalDialog::dismiss();
|
||||
irr_driver->cancelResChange();
|
||||
return true;
|
||||
} // escapePressed
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------
|
||||
|
||||
void ConfirmResolutionDialog::updateMessage()
|
||||
|
@ -20,6 +20,7 @@
|
||||
#define HEADER_CONFIRM_RES_DIALOG_HPP
|
||||
|
||||
#include "guiengine/modaldialog.hpp"
|
||||
#include "utils/cpp2011.hpp"
|
||||
|
||||
/**
|
||||
* \brief Dialog shown after a resolution switch sot he user may confirm if
|
||||
@ -28,6 +29,7 @@
|
||||
*/
|
||||
class ConfirmResolutionDialog : public GUIEngine::ModalDialog
|
||||
{
|
||||
private:
|
||||
/** number of seconds left before resolution is considered unplayable */
|
||||
float m_remaining_time;
|
||||
|
||||
@ -40,6 +42,7 @@ public:
|
||||
GUIEngine::EventPropagation processEvent(const std::string& eventSource);
|
||||
|
||||
virtual void onUpdate(float dt);
|
||||
virtual bool onEscapePressed() OVERRIDE;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user