bool ScriptEditorWindow::internal_isPointerHovering(ScriptEditorWindow* thisPtr)
	{
		if (!thisPtr->isDestroyed())
		{
			EditorWidgetBase* widget = thisPtr->getEditorWidget();
			EditorWindowBase* window = widget->getParentWindow();
			if (window == nullptr)
				return false;

			SPtr<RenderWindow> renderWindow = window->getRenderWindow();

			Vector2I pointerPos = gInput().getPointerPosition();
			if(Platform::isPointOverWindow(*renderWindow, pointerPos))
			{
				Rect2I bounds = thisPtr->getEditorWidget()->getBounds();

				Vector2I widgetPos(bounds.x, bounds.y);
				Vector2I screenPos = widget->widgetToScreenPos(widgetPos);

				bounds.x = screenPos.x;
				bounds.y = screenPos.y;

				return bounds.contains(pointerPos);
			}
		}

		return false;
	}
	void ScriptEditorWindow::internal_getBounds(ScriptEditorWindow* thisPtr, Rect2I* bounds)
	{
		if (!thisPtr->isDestroyed())
		{
			EditorWidgetBase* widget = thisPtr->getEditorWidget();
			*bounds = thisPtr->getEditorWidget()->getBounds();
			
			Vector2I widgetPos(0, 0);
			Vector2I screenPos = widget->widgetToScreenPos(widgetPos);

			bounds->x = screenPos.x;
			bounds->y = screenPos.y;
		}
		else
			*bounds = Rect2I();
	}