LibraryViewer
This commit is contained in:
parent
5a55011911
commit
c7d3b15758
24 changed files with 226111 additions and 36 deletions
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue