1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 19:58:11 +00:00

Minesweeper: Make it possible to win the game. :^)

This commit is contained in:
Andreas Kling 2019-04-13 15:51:29 +02:00
parent 198a1a6877
commit 28cf9a41fe
3 changed files with 60 additions and 13 deletions

View file

@ -25,13 +25,7 @@ int main(int argc, char** argv)
container->set_preferred_size({ 0, 36 });
container->set_layout(make<GBoxLayout>(Orientation::Horizontal));
auto* face_button = new GButton(container);
face_button->set_icon(GraphicsBitmap::load_from_file("/res/icons/minesweeper/face-default.png"));
auto* field = new Field(widget);
face_button->on_click = [field] (auto&) {
field->reset();
};
auto* field = new Field(*face_button, widget);
auto menubar = make<GMenuBar>();