Skip to content

Commit

Permalink
Added dashboard placeholder for timer and stats
Browse files Browse the repository at this point in the history
  • Loading branch information
henrykorir committed Jun 8, 2024
1 parent 29e4388 commit 4e6ce1b
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 17 deletions.
Binary file modified bin/Debug/minesweeper
Binary file not shown.
23 changes: 16 additions & 7 deletions minesweeper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@

wxBEGIN_EVENT_TABLE(MainFrame, wxFrame)
EVT_CLOSE(MainFrame::OnExitProgram)
wxEND_EVENT_TABLE()
wxEND_EVENT_TABLE()

MainFrame::MainFrame(const wxString &title)
MainFrame::MainFrame(const wxString &title)
: wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxMINIMIZE_BOX)
{
gridSizer = new wxGridSizer(9, 9, 0, 0);
wxBoxSizer * topSizer = new wxBoxSizer(wxVERTICAL);
wxBoxSizer * dashSizer = new wxBoxSizer(wxHORIZONTAL);
wxGridSizer * gridSizer = new wxGridSizer(9, 9, 0, 0);

wxPanel * top = new wxPanel(this,wxID_ANY,wxDefaultPosition);
wxStaticText * text = new wxStaticText(top,wxID_ANY,wxT("DASHBOARD"), wxDefaultPosition,wxDefaultSize, 0);
dashSizer->Add(top, 0, wxALL,4);


int id = 0;

Expand All @@ -27,12 +34,14 @@ wxBEGIN_EVENT_TABLE(MainFrame, wxFrame)
}
}

gridSizer->Fit(this);
gridSizer->SetSizeHints(this);
topSizer->Add(dashSizer, 0, wxALIGN_CENTER_HORIZONTAL | wxALL,4);
topSizer->Add(gridSizer, 0, wxALIGN_CENTER | wxALL, 4);
topSizer->Fit(this);
topSizer->SetSizeHints(this);

SetSizer(gridSizer);
SetSizer(topSizer);

Centre(wxBOTH);
this->Centre(wxBOTH);
}

MainFrame::~MainFrame()
Expand Down
6 changes: 3 additions & 3 deletions minesweeper.depend
Original file line number Diff line number Diff line change
Expand Up @@ -1631,21 +1631,21 @@
1714995324 source:/home/freedom/Desktop/work/minesweeper/minesweeper/minesweeper.cpp
"wx/wx.h"

1716922103 source:/home/freedom/Desktop/work/minesweeper/minesweeper.cpp
1717890325 source:/home/freedom/Desktop/work/minesweeper/minesweeper.cpp
"wx/wx.h"
<stdlib.h>
"minesweeper.h"
"field.h"

1716722955 source:/home/freedom/Desktop/work/minesweeper/field.cpp
1717621837 source:/home/freedom/Desktop/work/minesweeper/field.cpp
"wx/wx.h"
"field.h"
"minesweeper.h"

1716060291 /home/freedom/Desktop/work/minesweeper/field.h
"wx/wx.h"

1716060291 /home/freedom/Desktop/work/minesweeper/minesweeper.h
1717883797 /home/freedom/Desktop/work/minesweeper/minesweeper.h
"wx/wx.h"
"wx/stack.h"
"field.h"
Expand Down
1 change: 0 additions & 1 deletion minesweeper.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class MainFrame : public wxFrame
wxStack<Field*> st;
bool visited[81] {false};
bool instack[81] {false};
wxGridSizer * gridSizer;
bool isFieldValid(int,int);
wxDECLARE_EVENT_TABLE();
};
Expand Down
12 changes: 6 additions & 6 deletions minesweeper.layout
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Debug" />
<File name="minesweeper.cpp" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="2" zoom_2="0">
<File name="field.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3863" topLine="132" />
<Cursor1 position="330" topLine="0" />
</Cursor>
</File>
<File name="minesweeper.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="minesweeper.cpp" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="2" zoom_2="0">
<Cursor>
<Cursor1 position="444" topLine="10" />
<Cursor1 position="555" topLine="6" />
</Cursor>
</File>
<File name="field.cpp" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="828" topLine="34" />
</Cursor>
</File>
<File name="field.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="minesweeper.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="330" topLine="3" />
<Cursor1 position="444" topLine="0" />
</Cursor>
</File>
</CodeBlocks_layout_file>
Binary file modified obj/Debug/field.o
Binary file not shown.
Binary file modified obj/Debug/minesweeper.o
Binary file not shown.

0 comments on commit 4e6ce1b

Please sign in to comment.