EHS/src/io/BaseWindow.cpp
Karutoh bcd71cf2b5
All checks were successful
Build & Release / Windows-AMD64-Build (push) Successful in 1m8s
Build & Release / Linux-AMD64-Build (push) Successful in 1m30s
Build & Release / Linux-AARCH64-Build (push) Successful in 3m21s
Adjusted workflow.
2024-02-05 22:25:30 -08:00

72 lines
1.2 KiB
C++

#include "ehs/io/BaseWindow.h"
namespace ehs
{
BaseWindow::BaseWindow()
: created(false), focused(false), cursorVisible(true), cursorConstrained(false),
state(WindowState::NONE)
{
}
BaseWindow::BaseWindow(const BaseWindow &win)
: created(false), focused(false), cursorVisible(true), cursorConstrained(false),
state(WindowState::NONE)
{
}
BaseWindow &BaseWindow::operator=(const BaseWindow &win)
{
if (this == &win)
return *this;
created = false;
focused = false;
cursorPos = {};
cursorVisible = true;
cursorConstrained = false;
state = WindowState::NONE;
ih = {};
return *this;
}
bool BaseWindow::IsCreated() const
{
return created;
}
bool BaseWindow::Poll()
{
return true;
}
bool BaseWindow::HasFocus() const
{
return focused;
}
Vec2_s32 BaseWindow::GetCursorPos() const
{
return cursorPos;
}
bool BaseWindow::IsCursorVisible() const
{
return cursorVisible;
}
bool BaseWindow::IsCursorConstrained() const
{
return cursorConstrained;
}
WindowState BaseWindow::GetState() const
{
return state;
}
const InputHandler* BaseWindow::GetInputHandler() const
{
return &ih;
}
}