forked from Satissis/CourseplayEditor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Courseplay_EditorApp.cpp
65 lines (52 loc) · 1.43 KB
/
Courseplay_EditorApp.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/***************************************************************
* Name: Courseplay_EditorApp.cpp
* Purpose: Code for Application Class
* Author: Claus G. Pedersen aka Satis ([email protected])
* Created: 2013-06-08
* Copyright: Claus G. Pedersen aka Satis (https://github.com/Satissis/CourseplayEditor)
* License:
**************************************************************/
#include "Courseplay_EditorApp.h"
#include <wx/filename.h>
#ifdef __WXDEBUGLOG__
#include <wx/log.h>
#endif
#include "Settings.h"
//(*AppHeaders
#include "Courseplay_EditorMain.h"
#include <wx/image.h>
//*)
IMPLEMENT_APP(Courseplay_EditorApp);
bool Courseplay_EditorApp::OnInit()
{
#ifdef __WXDEBUGLOG__
logWindow = new wxLogWindow(NULL, wxT("Debug Logging"));
wxLog::SetActiveTarget(logWindow);
#endif
SetAppName(wxT("Courseplay Editor"));
Settings *setup = new Settings();
if (setup->isFirstTimeSetup())
setup->doFirstTimeSetup();
else
setup->loadLocale();
//(*AppInitialize
bool wxsOK = true;
wxInitAllImageHandlers();
if ( wxsOK )
{
Courseplay_EditorFrame* Frame = new Courseplay_EditorFrame(0);
Frame->Show();
SetTopWindow(Frame);
}
//*)
delete setup;
return wxsOK;
}
int Courseplay_EditorApp::OnExit()
{
#ifdef __WXDEBUGLOG__
if (logWindow)
delete logWindow;
#endif
return 0;
}