wayland rewrite complete
This commit is contained in:
parent
5ff43e240c
commit
721ff8f42f
8 changed files with 134 additions and 87 deletions
|
|
@ -9,8 +9,8 @@ int main() {
|
|||
// 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
|
||||
EventListener<MousePoint> clickListener(&window.onMouseLeftClick, [&window](MousePoint point){
|
||||
// Print the coordinates where the user clicked
|
||||
std::cout << std::format("Clicked on X:{} Y:{}!", MappedToPixel(point.x, window.width), MappedToPixel(point.y, window.height)) << std::endl;
|
||||
// Print the coordinates where the user clicked, we recieve the point in mapped space so we must convert it to pixels first
|
||||
std::cout << std::format("Clicked on X:{} Y:{}!", MappedToPixelBoundless(point.x, window.width), MappedToPixelBoundless(point.y, window.height)) << std::endl;
|
||||
});
|
||||
|
||||
// Listen specifically for the 'a' key being pressed down
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue