semi working wayland

This commit is contained in:
Jorijn van der Graaf 2025-11-17 00:44:45 +01:00
commit 4bb7219ccf
34 changed files with 13863 additions and 3121 deletions

View file

@ -3,7 +3,7 @@ import std;
using namespace Crafter;
int main() {
WindowWaylandWayland window("HelloWindow", 1280, 720);
Window window("HelloWindow", 1280, 720);
for(std::uint_fast32_t x = 0; x < 1280; x++) {
for(std::uint_fast32_t y = 0; y < 720; y++) {

View file

@ -6,7 +6,7 @@ using namespace Crafter;
int main() {
// Create a Wayland window named "HelloWindow" with resolution 1280x720
// (window creation explained in HelloWindow example)
WindowWaylandWayland window("HelloWindow", 1280, 720);
Window window("HelloWindow", 1280, 720);
// Listen for left mouse click events on the window
// The callback receives the MousePoint struct containing the click coordinates in float pixels from the top left corner

View file

@ -4,7 +4,7 @@ import std;
using namespace Crafter;
int main() {
WindowWaylandWayland window("HelloWindow", 1280, 720);
Window window("HelloWindow", 1280, 720);
UiElement& element = window.elements.emplace_back(
0.5, //anchorX: relative position where this elements x anchor (top-left) is placed to its parent x anchor

View file

@ -8,7 +8,7 @@ int main() {
The WindowWaylandWayland class is a specialized window implementation
that uses the Wayland display server protocol and renderer (hence the name "WaylandWayland").
*/
WindowWaylandWayland window("HelloWindow", 1280, 720);
Window window("HelloWindow", 1280, 720);
/*
This starts the windows main event loop, allowing it to respond to user input and system events.