commit
This commit is contained in:
parent
dfe9b1abe9
commit
c82c8c0887
35 changed files with 245 additions and 10 deletions
36
examples/HelloUI/README.md
Normal file
36
examples/HelloUI/README.md
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
# 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
|
||||
|
||||
[UiElement](https://crafter-graphics.docs.catcrafts.net/classCrafter_1_1UiElement.html)
|
||||
Loading…
Add table
Add a link
Reference in a new issue