LibraryViewer

This commit is contained in:
IlyaShurupov 2023-11-28 23:22:04 +03:00 committed by Ilya Shurupov
parent f6ba86aff8
commit dd71eba0ec
24 changed files with 226111 additions and 36 deletions

View file

@ -1,5 +1,7 @@
#pragma once
// TODO : fix this ugly shit
#include "Buffer.hpp"
#include "Graphics.hpp"
#include "Keycodes.hpp"
@ -14,10 +16,23 @@ namespace tp {
enum Type {
KEY,
MOUSE,
};
};
struct Events {
Vec2F mPointer;
const Vec2F& getPos() const;
bool isPressed() const;
bool isDown() const;
halnf getScrollY() const;
private:
friend Window;
Buffer<Event> mQueu;
Context* mContext;
};
private:
Window(int width, int height, const char* title);
~Window();
@ -33,10 +48,12 @@ namespace tp {
auto getContext() -> Context*;
Graphics::Canvas& getCanvas();
const Events& getEvents();
private:
Context* mContext;
Graphics mGraphics;
Buffer<Event> mEvents;
Events mEvents;
};
}