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

@ -6,17 +6,17 @@ const zterm = struct {
pub fn main() !void {
var sp = zterm.Spinner{
.loading_charset = &[_][]const u8{"", "", "", "", "", "", "", ""},
.loading_message = "Selling all your data to the CCP...",
.finished_charset = "",
.finished_message = "Lock your doors.",
.charset = &[_][]const u8{ "", "", "", "", "", "", "", "" },
.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");
time.sleep(2 * time.ns_per_s);
sp.setMessage("Calculating very important stuff while selling your data...");
try sp.stop();
time.sleep(2 * time.ns_per_s);
try sp.stop(.{
.charset = "",
.message = "Successfully sold all your data to the CCP! You data is not in safe hands!",
});
}