aboutsummaryrefslogtreecommitdiff
path: root/src/ochess.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ochess.cpp')
-rw-r--r--src/ochess.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ochess.cpp b/src/ochess.cpp
new file mode 100644
index 0000000..3510568
--- /dev/null
+++ b/src/ochess.cpp
@@ -0,0 +1,18 @@
+#include "ochess.hpp"
+#include "MainWindow.hpp"
+
+bool MyApp::OnInit() {
+ wxImage::AddHandler(new wxPNGHandler);
+
+ MainWindow *frame = new MainWindow();
+ frame->Show(true);
+ return true;
+}
+wxIMPLEMENT_APP(MyApp);
+
+void Abort(std::string msg) {
+ wxMessageDialog *dial = new wxMessageDialog(NULL, wxString(msg), wxT("Error"),
+ wxOK | wxICON_ERROR);
+ dial->ShowModal();
+ wxLogFatalError(wxString(msg));
+}