Begin Repo

This commit is contained in:
2024-08-10 21:20:28 -05:00
commit 08115f90ce
41 changed files with 19581 additions and 0 deletions

92
layers/baseLayer.cpp Normal file
View File

@@ -0,0 +1,92 @@
#include "baseLayer.h"
#include "application.h"
BaseLayer::BaseLayer()
{
}
BaseLayer::~BaseLayer()
{
}
void BaseLayer::onAttach()
{
}
void BaseLayer::onDetach()
{
}
void BaseLayer::onUpdate()
{
}
bool BaseLayer::onEvent(const Event* e)
{
EventHandler eh;
return eh.handleEvent(e, this);
}
bool BaseLayer::onMouseButtonPressed(const MouseButtonEvent *e)
{
return true;
}
bool BaseLayer::onMouseButtonReleased(const MouseButtonEvent *e)
{
App::Get().show = !App::Get().show;
return true;
}
bool BaseLayer::onMouseMoved(const MouseMovedEvent *e)
{
return true;
}
bool BaseLayer::onMouseScrolled(const MouseScrolledEvent *e)
{
return true;
}
bool BaseLayer::onKeyPressed(const KeyEvent *e)
{
return true;
}
bool BaseLayer::onKeyReleased(const KeyEvent *e)
{
return true;
}
bool BaseLayer::onKeyTyped(const KeyTypedEvent *)
{
return true;
}
bool BaseLayer::onWindowClose(const WindowEvent *e)
{
if (e->getWindowID() == SDL_GetWindowID(App::Get().getWindow())) {
App::Get().done = true;
}
return true;
}
bool BaseLayer::onWindowFocus(const WindowEvent *e)
{
return true;
}
bool BaseLayer::onWindowFocusLost(const WindowEvent *e)
{
return true;
}
bool BaseLayer::onWindowMoved(const WindowEvent *e)
{
return true;
}
bool BaseLayer::onWindowResize(const WindowEvent *e)
{
return true;
}