Changeset View
Changeset View
Standalone View
Standalone View
source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
#include "GameInterface/Messages.h" | #include "GameInterface/Messages.h" | ||||
#include "Misc/KeyMap.h" | #include "Misc/KeyMap.h" | ||||
#include "Tools/Common/Tools.h" | #include "Tools/Common/Tools.h" | ||||
#include "Tools/Common/Brushes.h" | #include "Tools/Common/Brushes.h" | ||||
#include "Tools/Common/MiscState.h" | #include "Tools/Common/MiscState.h" | ||||
#include <SDL.h> | |||||
static HighResTimer g_Timer; | static HighResTimer g_Timer; | ||||
/** | /** | ||||
* wxWidgets only registers the double click on mousedown. | * wxWidgets only registers the double click on mousedown. | ||||
*/ | */ | ||||
static int g_Clicks = 1; | static int g_Clicks = 1; | ||||
using namespace AtlasMessage; | using namespace AtlasMessage; | ||||
▲ Show 20 Lines • Show All 497 Lines • ▼ Show 20 Lines | #undef ADD_HELP_ITEM | ||||
// Set up sidebars: | // Set up sidebars: | ||||
m_SectionLayout.Build(*this); | m_SectionLayout.Build(*this); | ||||
#if defined(__WXMSW__) | #if defined(__WXMSW__) | ||||
// The canvas' context gets made current on creation; but it can only be | // The canvas' context gets made current on creation; but it can only be | ||||
// current for one thread at a time, and it needs to be current for the | // current for one thread at a time, and it needs to be current for the | ||||
// thread that is doing the draw calls, so disable it for this one. | // thread that is doing the draw calls, so disable it for this one. | ||||
wglMakeCurrent(NULL, NULL); | POST_MESSAGE(MakeCurrent, ()); | ||||
#elif defined(__WXGTK__) || defined(__WXOSX__) || defined(__WXMAC__) | #elif defined(__WXGTK__) || defined(__WXOSX__) || defined(__WXMAC__) | ||||
// Need to make sure the canvas is realised, so that its context is valid | // Need to make sure the canvas is realised, so that its context is valid | ||||
// this solves the "invalid drawable" error | // this solves the "invalid drawable" error | ||||
Show(true); | Show(true); | ||||
Raise(); | Raise(); | ||||
#endif | #endif | ||||
#ifdef __WXGTK__ | #ifdef __WXGTK__ | ||||
// TODO: wxSafeYield causes issues on wxOSX 2.9, is it necessary? | // TODO: wxSafeYield causes issues on wxOSX 2.9, is it necessary? | ||||
▲ Show 20 Lines • Show All 573 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator