+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/guiengine/engine.cpp b/src/guiengine/engine.cpp
index cc18649d6..7f8866d04 100644
--- a/src/guiengine/engine.cpp
+++ b/src/guiengine/engine.cpp
@@ -451,10 +451,8 @@
You can also explore the various methods in GUIEngine::Screen to discover
more optional callbacks you can use.
- You can also create dialogs by deriving from GUIEngine::ModalDialog.
- Unfortunately, it is currently not possible to specify modal dialogs through
- XML files (FIXME), so you will need to simulate the init sequence of a GUI
- screen, which I admit is not too easy. This is to improve in the future.
+ You can also create dialogs by deriving from GUIEngine::ModalDialog in a very
+ similar way.
*/
diff --git a/src/states_screens/dialogs/confirm_resolution_dialog.cpp b/src/states_screens/dialogs/confirm_resolution_dialog.cpp
index 4cca7f522..6f74877c6 100644
--- a/src/states_screens/dialogs/confirm_resolution_dialog.cpp
+++ b/src/states_screens/dialogs/confirm_resolution_dialog.cpp
@@ -17,13 +17,10 @@
#include "states_screens/dialogs/confirm_resolution_dialog.hpp"
-#include "config/player.hpp"
#include "graphics/irr_driver.hpp"
#include "guiengine/engine.hpp"
-#include "guiengine/scalable_font.hpp"
-#include "guiengine/widgets/button_widget.hpp"
-#include "input/device_manager.hpp"
-#include "input/input_manager.hpp"
+#include "guiengine/screen.hpp"
+#include "guiengine/widgets/label_widget.hpp"
#include "states_screens/state_manager.hpp"
#include "utils/string_utils.hpp"
#include "utils/translation.hpp"
@@ -36,63 +33,10 @@ using namespace irr::core;
ConfirmResolutionDialog::ConfirmResolutionDialog() : ModalDialog(0.7f, 0.7f)
{
- m_countdown_message = NULL;
-
- ScalableFont* font = GUIEngine::getFont();
- const int textHeight = GUIEngine::getFontHeight();
- const int buttonHeight = textHeight + 10;
-
- const int y_bottom = m_area.getHeight() - 2*(buttonHeight + 10) - 10;
-
+ loadFromFile("confirm_resolution_dialog.stkgui");
m_remaining_time = 10.99f;
- // ---- Add label
- core::rect