Crafter.Graphics/example/HelloUI
2025-06-14 01:45:33 +02:00
..
main.cpp doc hell 2025-06-14 01:45:33 +02:00
project.json documentation 2025-06-13 23:59:36 +02:00
README documentation 2025-06-13 23:59:36 +02:00

# HelloWindow Example

## Description

This example demonstrates how to draw pixels to a window.

## Expected Result

A window with a green and blue colored square, when clicking on the square it logs the coordinates relative to the square.

##  Highlighted Code Snippet

```cpp
UiElement& element = window.elements.emplace_back(
    0.5,
    0.5, 
    2,
    1,
    0.5f,
    0.5f,
    0.5,
    0.5,
    0,
    false 
);
```

## How to Run

```bash
crafter-build -c example -r
```

## Relevant documentation