oh yeah its rewrite time
This commit is contained in:
parent
02a6a64c56
commit
1c4f476f18
7 changed files with 183 additions and 154 deletions
|
|
@ -44,7 +44,6 @@ import :Types;
|
|||
import Crafter.Event;
|
||||
|
||||
export namespace Crafter {
|
||||
class UiElement;
|
||||
class Transform;
|
||||
class Window {
|
||||
public:
|
||||
|
|
@ -67,6 +66,7 @@ export namespace Crafter {
|
|||
void ScaleElement(Transform& element, Transform& parent);
|
||||
void ScaleElement(Transform& element);
|
||||
void ScaleMouse(Transform& element, Transform& parent);
|
||||
void ScaleMouse(Transform& element);
|
||||
};
|
||||
|
||||
class WindowKeyboard {
|
||||
|
|
@ -80,6 +80,7 @@ export namespace Crafter {
|
|||
Event<char> onAnyKeyUp;
|
||||
};
|
||||
|
||||
class MouseElement;
|
||||
class WindowMouse {
|
||||
public:
|
||||
Event<MousePoint> onMouseRightClick;
|
||||
|
|
@ -97,7 +98,7 @@ export namespace Crafter {
|
|||
MousePoint mouseDelta;
|
||||
bool mouseLeftHeld = false;
|
||||
bool mouseRightHeld = false;
|
||||
std::vector<UiElement*> mouseElements;
|
||||
std::vector<MouseElement*> mouseElements;
|
||||
};
|
||||
|
||||
class WindowTitle {
|
||||
|
|
@ -121,11 +122,11 @@ export namespace Crafter {
|
|||
};
|
||||
|
||||
#ifdef CRAFTER_GRAPHICS_WAYLAND
|
||||
class UiElementBufferBuffer;
|
||||
class RenderingElement;
|
||||
class WindowWayland final : public WindowKeyboard, public WindowMouse, public WindowFramebuffer, public WindowTitle {
|
||||
public:
|
||||
Pixel_BU8_GU8_RU8_AU8* framebuffer = nullptr;
|
||||
std::vector<UiElement*> elements;
|
||||
std::vector<RenderingElement*> elements;
|
||||
WindowWayland(std::uint_fast32_t width, std::uint_fast32_t height);
|
||||
WindowWayland(std::uint_fast32_t width, std::uint_fast32_t height, const std::string_view title);
|
||||
~WindowWayland();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue