Change WindowBase to allow for better code sharing for platforms without advanced windowing
This commit is contained in:
@@ -6,17 +6,8 @@
|
||||
#include "Engine/Graphics/RenderTask.h"
|
||||
#include <Engine/Main/Android/android_native_app_glue.h>
|
||||
|
||||
#define DefaultDPI 96
|
||||
|
||||
AndroidWindow::AndroidWindow(const CreateWindowSettings& settings)
|
||||
: WindowBase(settings)
|
||||
{
|
||||
_clientSize = settings.Size;
|
||||
_dpi = DefaultDPI;
|
||||
_dpiScale = (float)_dpi / (float)DefaultDPI;
|
||||
}
|
||||
|
||||
AndroidWindow::~AndroidWindow()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -52,27 +43,6 @@ void AndroidWindow::Hide()
|
||||
}
|
||||
}
|
||||
|
||||
void AndroidWindow::Minimize()
|
||||
{
|
||||
}
|
||||
|
||||
void AndroidWindow::Maximize()
|
||||
{
|
||||
}
|
||||
|
||||
void AndroidWindow::Restore()
|
||||
{
|
||||
}
|
||||
|
||||
void AndroidWindow::BringToFront(bool force)
|
||||
{
|
||||
}
|
||||
|
||||
bool AndroidWindow::IsClosed() const
|
||||
{
|
||||
return _isClosing;
|
||||
}
|
||||
|
||||
void AndroidWindow::SetClientBounds(const Rectangle& clientArea)
|
||||
{
|
||||
if (Vector2::NearEqual(_clientSize, clientArea.Size))
|
||||
@@ -84,55 +54,4 @@ void AndroidWindow::SetClientBounds(const Rectangle& clientArea)
|
||||
OnResize(width, height);
|
||||
}
|
||||
|
||||
void AndroidWindow::SetPosition(const Vector2& position)
|
||||
{
|
||||
}
|
||||
|
||||
void AndroidWindow::SetClientPosition(const Vector2& position)
|
||||
{
|
||||
}
|
||||
|
||||
Vector2 AndroidWindow::GetPosition() const
|
||||
{
|
||||
return Vector2::Zero;
|
||||
}
|
||||
|
||||
Vector2 AndroidWindow::GetSize() const
|
||||
{
|
||||
return _clientSize;
|
||||
}
|
||||
|
||||
Vector2 AndroidWindow::GetClientSize() const
|
||||
{
|
||||
return _clientSize;
|
||||
}
|
||||
|
||||
Vector2 AndroidWindow::ScreenToClient(const Vector2& screenPos) const
|
||||
{
|
||||
return screenPos;
|
||||
}
|
||||
|
||||
Vector2 AndroidWindow::ClientToScreen(const Vector2& clientPos) const
|
||||
{
|
||||
return clientPos;
|
||||
}
|
||||
|
||||
void AndroidWindow::SetTitle(const StringView& title)
|
||||
{
|
||||
_title = title;
|
||||
}
|
||||
|
||||
DragDropEffect AndroidWindow::DoDragDrop(const StringView& data)
|
||||
{
|
||||
return DragDropEffect::None;
|
||||
}
|
||||
|
||||
void AndroidWindow::StartTrackingMouse(bool useMouseScreenOffset)
|
||||
{
|
||||
}
|
||||
|
||||
void AndroidWindow::EndTrackingMouse()
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,34 +21,13 @@ public:
|
||||
/// <param name="settings">The initial window settings.</param>
|
||||
AndroidWindow(const CreateWindowSettings& settings);
|
||||
|
||||
/// <summary>
|
||||
/// Finalizes an instance of the <see cref="AndroidWindow"/> class.
|
||||
/// </summary>
|
||||
~AndroidWindow();
|
||||
|
||||
public:
|
||||
|
||||
// [Window]
|
||||
void* GetNativePtr() const override;
|
||||
void Show() override;
|
||||
void Hide() override;
|
||||
void Minimize() override;
|
||||
void Maximize() override;
|
||||
void Restore() override;
|
||||
bool IsClosed() const override;
|
||||
void BringToFront(bool force = false) override;
|
||||
void SetClientBounds(const Rectangle& clientArea) override;
|
||||
void SetPosition(const Vector2& position) override;
|
||||
void SetClientPosition(const Vector2& position) override;
|
||||
Vector2 GetPosition() const override;
|
||||
Vector2 GetSize() const override;
|
||||
Vector2 GetClientSize() const override;
|
||||
Vector2 ScreenToClient(const Vector2& screenPos) const override;
|
||||
Vector2 ClientToScreen(const Vector2& clientPos) const override;
|
||||
void SetTitle(const StringView& title) override;
|
||||
DragDropEffect DoDragDrop(const StringView& data) override;
|
||||
void StartTrackingMouse(bool useMouseScreenOffset) override;
|
||||
void EndTrackingMouse() override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user