diff options
author | chai <chaifix@163.com> | 2021-10-28 10:39:31 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-10-28 10:39:31 +0800 |
commit | 8cbcd2dc3f7ea5a1d8656cd3885b553121cb7450 (patch) | |
tree | 216433c4e919ecac921e0d1eb3a96e19fc4fd032 /Editor/GUI | |
parent | d162d7711177c414e5ea9a3876dc6fa3414c937e (diff) |
*internal
Diffstat (limited to 'Editor/GUI')
-rw-r--r-- | Editor/GUI/ContainerWindow.cpp | 12 | ||||
-rw-r--r-- | Editor/GUI/EditorWindows.h | 4 | ||||
-rw-r--r-- | Editor/GUI/WindowManager.cpp | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/Editor/GUI/ContainerWindow.cpp b/Editor/GUI/ContainerWindow.cpp index 5f3e6f8..96e5a1b 100644 --- a/Editor/GUI/ContainerWindow.cpp +++ b/Editor/GUI/ContainerWindow.cpp @@ -265,16 +265,16 @@ bool ContainerWindow::SetRenderContext() if (m_RC && !g_IsGLInitialized) { log_info("Initialize OpenGL"); - wglMakeCurrent(m_DC, m_RC);
- if (!gladLoadGL()) {
- log_error("初始化GL错误");
- }
+ wglMakeCurrent(m_DC, m_RC); + if (!gladLoadGL()) { + log_error("初始化GL错误"); + } g_IsGLInitialized = true; } } // 初始化,创建窗口 -void ContainerWindow::Init(Rect pixelRect, int showMode, const Vector2& minSize, const Vector2& maxSize, std::string name) +void ContainerWindow::Init(Rect pixelRect, int showMode, const Internal::Vector2& minSize, const Internal::Vector2& maxSize, std::string name) { // Aux windows are mac only. on windows they look just like normal utility windows. if (showMode == kShowAuxWindow) @@ -343,7 +343,7 @@ void ContainerWindow::Init(Rect pixelRect, int showMode, const Vector2& minSize, // parentWindow = GetMainEditorWindow(); } - bool notSizeable = (minSize == maxSize) && (minSize != Vector2::zero); + bool notSizeable = (minSize == maxSize) && (minSize != Internal::Vector2::zero); if (notSizeable) windowStyle &= ~(WS_THICKFRAME); diff --git a/Editor/GUI/EditorWindows.h b/Editor/GUI/EditorWindows.h index 3e0471a..9628af8 100644 --- a/Editor/GUI/EditorWindows.h +++ b/Editor/GUI/EditorWindows.h @@ -29,7 +29,7 @@ public : class WindowManager : Singleton<WindowManager> { public: - static Vector2 GetMousePosition(); + static Internal::Vector2 GetMousePosition(); static GUIWindow* GetMouseOverWindow(); private: @@ -56,7 +56,7 @@ public: ContainerWindow(LuaBind::VM* vm); ~ContainerWindow(); - void Init(Rect size, int showMode, const Vector2& minSize, const Vector2& maxSize, std::string name = ""); + void Init(Rect size, int showMode, const Internal::Vector2& minSize, const Internal::Vector2& maxSize, std::string name = ""); void SetTitle(const char* title); void SetIcon(LPCSTR iconName); void SetAsRenderContext(); diff --git a/Editor/GUI/WindowManager.cpp b/Editor/GUI/WindowManager.cpp index d8a4135..d6d8b1e 100644 --- a/Editor/GUI/WindowManager.cpp +++ b/Editor/GUI/WindowManager.cpp @@ -8,12 +8,12 @@ GUIWindow* WindowManager::GetMouseOverWindow() return NULL; } -Vector2 WindowManager::GetMousePosition() +Internal::Vector2 WindowManager::GetMousePosition() { POINT pt; if (!GetCursorPos(&pt)) - return Vector2(0, 0); + return Internal::Vector2(0, 0); - return Vector2(pt.x, pt.y); + return Internal::Vector2(pt.x, pt.y); } |