wxMahjong/App.cpp

21 lines
531 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "App.h"
#include "MainFrame.h"
#include <wx/filefn.h>
wxIMPLEMENT_APP(MyApp);
bool MyApp::OnInit() {
wxImage::AddHandler(new wxPNGHandler());
MainFrame* frame = new MainFrame(); // Создаём,
if (argc >= 2 && wxFileExists(argv[1]))
frame->layoutPath = argv[1];
frame->Show(true); // показываем
SetTopWindow(frame); // и устанавливаем главным окном, а так же выносим вперёд основное окно игры
return true;
}