1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:27:44 +00:00

Minesweeper: Port to GML compilation

This patch ports minesweeper to GML compilation,
and introduces a few changes made to associated files.
This commit is contained in:
tetektoza 2023-09-25 19:45:37 +02:00 committed by Tim Schumacher
parent 1c37385904
commit 4db9996cc0
8 changed files with 95 additions and 30 deletions

View file

@ -7,20 +7,25 @@
#pragma once
#include "CustomGameWidget.h"
#include <LibGUI/Button.h>
#include <LibGUI/Dialog.h>
#include <LibGUI/MessageBox.h>
#include <LibGUI/SpinBox.h>
class Field;
namespace Minesweeper {
class CustomGameDialog : public GUI::Dialog {
C_OBJECT(CustomGameDialog);
C_OBJECT_ABSTRACT(CustomGameDialog);
public:
static ExecResult show(GUI::Window* parent_window, Field& field);
static ErrorOr<NonnullRefPtr<CustomGameDialog>> try_create(GUI::Window* parent);
private:
CustomGameDialog(GUI::Window* parent_window);
CustomGameDialog(NonnullRefPtr<CustomGameWidget> custom_game_widget, GUI::Window* parent_window);
virtual ~CustomGameDialog() override = default;
void set_max_mines();
@ -31,3 +36,5 @@ private:
RefPtr<GUI::SpinBox> m_rows_spinbox;
RefPtr<GUI::SpinBox> m_mines_spinbox;
};
}