Simplify to return main window even in editor.
This commit is contained in:
@@ -183,11 +183,7 @@ void Screen::SetGameWindowMode(GameWindowMode windowMode)
|
||||
|
||||
Window* Screen::GetMainWindow()
|
||||
{
|
||||
Window* win = nullptr;
|
||||
#if !USE_EDITOR
|
||||
win = Engine::MainWindow;
|
||||
#endif
|
||||
return win;
|
||||
return Engine::MainWindow;
|
||||
}
|
||||
|
||||
void ScreenService::Update()
|
||||
|
||||
@@ -98,7 +98,7 @@ DECLARE_SCRIPTING_TYPE_NO_SPAWN(Screen);
|
||||
API_PROPERTY() static void SetGameWindowMode(GameWindowMode windowMode);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the main window. Only during built game.
|
||||
/// Gets the main window.
|
||||
/// </summary>
|
||||
/// <returns>The current window. Will be null if fails.</returns>
|
||||
API_PROPERTY() static Window* GetMainWindow();
|
||||
|
||||
Reference in New Issue
Block a user