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

Minesweeper: Add flag counter and game timer.

This commit is contained in:
Andreas Kling 2019-04-14 21:01:52 +02:00
parent adc91d92a3
commit 1503834c3b
3 changed files with 37 additions and 4 deletions

View file

@ -6,6 +6,7 @@
#include <LibGUI/GMenu.h>
#include <LibGUI/GMenuBar.h>
#include <LibGUI/GAction.h>
#include <LibGUI/GLabel.h>
int main(int argc, char** argv)
{
@ -24,8 +25,10 @@ int main(int argc, char** argv)
container->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
container->set_preferred_size({ 0, 36 });
container->set_layout(make<GBoxLayout>(Orientation::Horizontal));
auto* flag_label = new GLabel(container);
auto* face_button = new GButton(container);
auto* field = new Field(*face_button, widget);
auto* time_label = new GLabel(container);
auto* field = new Field(*flag_label, *time_label, *face_button, widget);
auto menubar = make<GMenuBar>();