Skip to content

Commit

Permalink
Added menu bar
Browse files Browse the repository at this point in the history
  • Loading branch information
henrykorir committed Jul 3, 2024
1 parent caea463 commit 28b58ee
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions minesweeper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ MainFrame::MainFrame(const wxString &title)
: wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxMINIMIZE_BOX)
{
SetIcon(wxIcon("./mine.png",wxBITMAP_TYPE_PNG, -1,-1));

//Adding menubar and menus
wxMenu * m_menu = new wxMenu();
m_menu->Append(wxID_OPEN, wxT("&New"));
m_menu->Append(wxID_EXIT, wxT("&Exit"));
wxMenuBar * m_menubar = new wxMenuBar();
m_menubar->Append(m_menu, wxT("File"));
SetMenuBar(m_menubar);

m_timer = new wxTimer(this, TIMER_ID);
m_timer->Start(1000);

Expand Down

0 comments on commit 28b58ee

Please sign in to comment.