Updated README.md
This commit is contained in:
parent
96c6b06725
commit
3389c86611
1 changed files with 38 additions and 0 deletions
38
README.md
38
README.md
|
|
@ -33,3 +33,41 @@ std.debug.print("TypeID(Player): {}\n", .{TypeID(Player)});
|
||||||
```bash
|
```bash
|
||||||
Output: TypeID(Player): 2462284566368800629
|
Output: TypeID(Player): 2462284566368800629
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## NicePrint
|
||||||
|
|
||||||
|
# Styles
|
||||||
|
- default
|
||||||
|
- rounded
|
||||||
|
- pipe
|
||||||
|
- custom
|
||||||
|
|
||||||
|
# Example
|
||||||
|
```zig
|
||||||
|
// --- PRINT ---
|
||||||
|
if (log.print(.debug, "DEVICE INFO", ansi.bold ++ ansi.red)) |a| {
|
||||||
|
defer a.end();
|
||||||
|
|
||||||
|
// --- VALUES ---
|
||||||
|
a.write("device -> {s}", .{"GTX"});
|
||||||
|
a.write("vendor -> {s}", .{"Nvidia"});
|
||||||
|
|
||||||
|
// --- SECTION ---
|
||||||
|
if (a.section(.err, "MEMORY", ansi.green)) |b| {
|
||||||
|
defer b.end();
|
||||||
|
|
||||||
|
b.write("VRAM -> {}GB", .{24});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
# Output
|
||||||
|
```bash
|
||||||
|
┏━ DEVICE INFO
|
||||||
|
┃ device -> GTX
|
||||||
|
┃ vendor -> Nvidia
|
||||||
|
┃ ┏━ MEMORY
|
||||||
|
┃ ┃ VRAM -> 24GB
|
||||||
|
┃ ┗━
|
||||||
|
┗━
|
||||||
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue