1
Fork 0
mirror of https://github.com/RGBCube/ZTerm synced 2025-07-29 08:57:46 +00:00

Cleanup whole API

This commit is contained in:
RGBCube 2023-05-18 22:10:40 +03:00
parent 7f5fdc55ea
commit 977f47342e
3 changed files with 49 additions and 31 deletions

View file

@ -16,17 +16,17 @@ const zterm = @import("zterm");
pub fn main() !void {
var sp = zterm.Spinner{
.loading_charset = &[_][]const u8{"⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷"},
.loading_message = "Selling all your data to the CCP...",
.charset = &[_][]const u8{"⣾", "⣽", "⣻", "⢿", "⡿", "⣟", "⣯", "⣷"},
.finished_charset = "✓",
.finished_message = "Lock your doors.",
.message = "Selling all your data to the CCP...",
};
try sp.start();
time.sleep(3 * time.ns_per_s);
var stdOut = std.io.getStdOut();
try stdOut.writeAll("\rCalculating very important stuff while selling your data...\n");
sp.setMessage("Calculating very important stuff while selling your data...");
time.sleep(2 * time.ns_per_s);
sp.setMessage("Sold all your data successfully!");
try sp.stop();
}