Skip to content

Commit

Permalink
Add unicode demo screenshot to the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
akarpovskii committed May 30, 2024
1 parent b652491 commit 76b3193
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
10 changes: 10 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,13 @@ How to implement a custom widget using FPS counter as an example. Can be used to

![FPS Counter gif](./images/fps_counter.gif)
</details>

## [`unicode`](./src/unicode.zig)

Demo showcasing Unicode support

<details>
<summary>VHS recording</summary>

![Unicode table](./images/unicode.png)
</details>
Binary file added examples/images/unicode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions examples/images/unicode.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Set Width 1080
Set Height 1200

Set Theme { "name": "Whimsy", "black": "#535178", "red": "#ef6487", "green": "#5eca89", "yellow": "#fdd877", "blue": "#65aef7", "magenta": "#aa7ff0", "cyan": "#43c1be", "white": "#ffffff", "brightBlack": "#535178", "brightRed": "#ef6487", "brightGreen": "#5eca89", "brightYellow": "#fdd877", "brightBlue": "#65aef7", "brightMagenta": "#aa7ff0", "brightCyan": "#43c1be", "brightWhite": "#ffffff", "background": "#f9feff", "foreground": "#b3b0d6", "selection": "#3d3c58", "cursor": "#b3b0d6" }

Set Padding 40
Set MarginFill "#F9FEFF"

Hide
Type "zig build unicode"
Enter
Sleep 1s
Show

Screenshot unicode.png

Sleep 1s

Hide
Ctrl+C
2 changes: 1 addition & 1 deletion examples/src/unicode.zig
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pub fn main() !void {
),

tuile.block(
.{ .border = tuile.border.Border.all(), .layout = .{ .flex = 1 } },
.{ .border = tuile.border.Border.all(), .layout = .{ .flex = 0 } },
tuile.label(.{ .id = "unicode-bytes", .text = "" }),
),

Expand Down

0 comments on commit 76b3193

Please sign in to comment.