summaryrefslogtreecommitdiff
path: root/Editor
diff options
context:
space:
mode:
Diffstat (limited to 'Editor')
-rw-r--r--Editor/GUI/ContainerWindow.cpp5
-rw-r--r--Editor/GUI/EditorWindows.h9
-rw-r--r--Editor/GUI/GUIWindow.cpp5
-rw-r--r--Editor/GUI/WindowManager.cpp7
-rw-r--r--Editor/Scripting/EditorGUI/ContainerWindow.bind.cpp7
-rw-r--r--Editor/Scripting/EditorGUI/GUIWindow.bind.cpp3
6 files changed, 21 insertions, 15 deletions
diff --git a/Editor/GUI/ContainerWindow.cpp b/Editor/GUI/ContainerWindow.cpp
index d737838..f7d9e45 100644
--- a/Editor/GUI/ContainerWindow.cpp
+++ b/Editor/GUI/ContainerWindow.cpp
@@ -6,6 +6,7 @@
#include "MenuManager.h"
#include "Runtime/Utilities/Assert.h"
#include "Editor/Graphics/Graphics.h"
+#include "Runtime/Math/Math.h"
using namespace std;
@@ -273,7 +274,7 @@ bool ContainerWindow::SetRenderContext()
}
// 初始化,创建窗口
-void ContainerWindow::Init(Internal::Rect pixelRect, int showMode, const Internal::Vector2& minSize, const Internal::Vector2& maxSize, std::string name)
+void ContainerWindow::Init(Rect pixelRect, int showMode, const Vector2& minSize, const Vector2& maxSize, std::string name)
{
// Aux windows are mac only. on windows they look just like normal utility windows.
if (showMode == kShowAuxWindow)
@@ -342,7 +343,7 @@ void ContainerWindow::Init(Internal::Rect pixelRect, int showMode, const Interna
// parentWindow = GetMainEditorWindow();
}
- bool notSizeable = (minSize == maxSize) && (minSize != Internal::Vector2::zero);
+ bool notSizeable = (minSize == maxSize) && (minSize != Vector2::zero);
if (notSizeable)
windowStyle &= ~(WS_THICKFRAME);
diff --git a/Editor/GUI/EditorWindows.h b/Editor/GUI/EditorWindows.h
index e1ad89a..78d9ca8 100644
--- a/Editor/GUI/EditorWindows.h
+++ b/Editor/GUI/EditorWindows.h
@@ -11,6 +11,7 @@
#include "Runtime/Graphics/OpenGL.h"
#include "Runtime/Utilities/UtilMacros.h"
#include "Editor/Utils/HelperFuncs.h"
+#include "Runtime/Math/Math.h"
using namespace LuaBind;
@@ -29,7 +30,7 @@ public :
class WindowManager : Singleton<WindowManager>
{
public:
- static Internal::Vector2 GetMousePosition();
+ static Vector2 GetMousePosition();
static GUIWindow* GetMouseOverWindow();
private:
@@ -56,7 +57,7 @@ public:
ContainerWindow(LuaBind::VM* vm);
~ContainerWindow();
- void Init(Internal::Rect size, int showMode, const Internal::Vector2& minSize, const Internal::Vector2& maxSize, std::string name = "");
+ void Init(Rect size, int showMode, const Vector2& minSize, const Vector2& maxSize, std::string name = "");
void SetTitle(const char* title);
void SetIcon(LPCSTR iconName);
void SetAsRenderContext();
@@ -83,7 +84,7 @@ private:
bool m_IsClosing;
bool m_InMenuLoop;
bool m_CloseFromScriptDontShutdown;
- Internal::Rect m_InternalRect;
+ Rect m_InternalRect;
POINT m_MinSize;
POINT m_MaxSize;
@@ -138,7 +139,7 @@ public:
void DoPaint();
void SetContainerWindow(ContainerWindow* wnd);
void Focus();
- void SetPosition(Internal::Rect position);
+ void SetPosition(Rect position);
void SetAsRenderContext();
void OnFocus();
diff --git a/Editor/GUI/GUIWindow.cpp b/Editor/GUI/GUIWindow.cpp
index 011dfa8..cd49445 100644
--- a/Editor/GUI/GUIWindow.cpp
+++ b/Editor/GUI/GUIWindow.cpp
@@ -3,6 +3,7 @@
#include "Runtime/Graphics/OpenGL.h"
#include "Editor/Graphics/Graphics.h"
#include "Editor/Win/Win.h"
+#include "Runtime/Math/Math.h"
static bool RedirectMouseWheel(HWND window, WPARAM wParam, LPARAM lParam)
{
@@ -201,7 +202,7 @@ void GUIWindow::Init(std::string name)
//DWORD windowStyle = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_CLIPCHILDREN | WS_MAXIMIZEBOX | WS_MINIMIZEBOX;
DWORD extendedStyle = WS_EX_TOOLWINDOW;
- Internal::Rect pixelRect;
+ Rect pixelRect;
pixelRect.x = 0;
pixelRect.y = 0;
pixelRect.width = 32;
@@ -316,7 +317,7 @@ void GUIWindow::OnPaint()
InvokeLuaCallback(m_Script, "OnGUI");
}
-void GUIWindow::SetPosition(Internal::Rect position)
+void GUIWindow::SetPosition(Rect position)
{
log_info("GUIWindow::SetPosition()");
RECT rc;
diff --git a/Editor/GUI/WindowManager.cpp b/Editor/GUI/WindowManager.cpp
index d6d8b1e..5ba3086 100644
--- a/Editor/GUI/WindowManager.cpp
+++ b/Editor/GUI/WindowManager.cpp
@@ -1,5 +1,6 @@
#include "EditorWindows.h"
#include "WinUtils.h"
+#include "Runtime/Math/Math.h"
std::vector<GUIWindow*> WindowManager::s_GUIWindows;
@@ -8,12 +9,12 @@ GUIWindow* WindowManager::GetMouseOverWindow()
return NULL;
}
-Internal::Vector2 WindowManager::GetMousePosition()
+Vector2 WindowManager::GetMousePosition()
{
POINT pt;
if (!GetCursorPos(&pt))
- return Internal::Vector2(0, 0);
+ return Vector2(0, 0);
- return Internal::Vector2(pt.x, pt.y);
+ return Vector2(pt.x, pt.y);
}
diff --git a/Editor/Scripting/EditorGUI/ContainerWindow.bind.cpp b/Editor/Scripting/EditorGUI/ContainerWindow.bind.cpp
index 5906788..0269b72 100644
--- a/Editor/Scripting/EditorGUI/ContainerWindow.bind.cpp
+++ b/Editor/Scripting/EditorGUI/ContainerWindow.bind.cpp
@@ -1,4 +1,5 @@
#include "Editor/GUI/EditorWindows.h"
+#include "Runtime/Math/Math.h"
LUA_BIND_REGISTRY(ContainerWindow)
{
@@ -56,10 +57,10 @@ LUA_BIND_IMPL_METHOD(ContainerWindow, ContainerWindow::_New)
ContainerWindow* wnd = new ContainerWindow(state.GetVM());
- Internal::Rect rect = state.GetValue<Internal::Rect>(state, Internal::Rect());
+ Rect rect = state.GetValue<Rect>(state, Rect());
int showMode = state.GetValue<int>(2, 0);
- Internal::Vector2 min = state.GetValue<Internal::Vector2>(state, Internal::Vector2());
- Internal::Vector2 max = state.GetValue<Internal::Vector2>(state, Internal::Vector2());
+ Vector2 min = state.GetValue<Vector2>(state, Vector2());
+ Vector2 max = state.GetValue<Vector2>(state, Vector2());
wnd->Init(rect, showMode, min, max);
diff --git a/Editor/Scripting/EditorGUI/GUIWindow.bind.cpp b/Editor/Scripting/EditorGUI/GUIWindow.bind.cpp
index 7e31da5..dbb26f4 100644
--- a/Editor/Scripting/EditorGUI/GUIWindow.bind.cpp
+++ b/Editor/Scripting/EditorGUI/GUIWindow.bind.cpp
@@ -1,4 +1,5 @@
#include "Editor/GUI/EditorWindows.h"
+#include "Runtime/Math/Math.h"
LUA_BIND_REGISTRY(GUIWindow)
{
@@ -62,7 +63,7 @@ LUA_BIND_IMPL_METHOD(GUIWindow, _SetPosition)
if (!state.CheckParams(1, "UT"))
return 0;
- Internal::Rect rect;
+ Rect rect;
rect.x = state.GetField<float>(2, 1, 0);
rect.y = state.GetField<float>(2, 2, 0);
rect.width = state.GetField<float>(2, 3, 0);