?`??´ 1010

The Beauty — Terminal UI

Methods

clear / pa_iboju

Ose.clear()

Clear the terminal screen.

Ose.clear();
Irosu.fo("Fresh screen!");

cursor / afihan

Ose.cursor(x: Int, y: Int)

Move cursor to position.

Ose.cursor(10, 5);
Irosu.fo("At position 10,5");

color / aw?

Ose.color(fg: String, [bg: String])

Set text foreground and background colors.

Ose.color("red");
Irosu.fo("Red text!");

Ose.color("white", "blue");
Irosu.fo("White on blue");

style / ara

Ose.style(style: String)

Set text style (bold, italic, underline).

Ose.style("bold");
Irosu.fo("Bold text!");

Ose.style("reset");
Irosu.fo("Normal text");

size / iwon

Ose.size() ? Object

Get terminal dimensions.

ayanmo dim = Ose.size();
// dim.width, dim.height

Example: Colorful Output

// Rainbow text
Ose.clear();

ayanmo colors = ["red", "yellow", "green", "cyan", "blue", "magenta"];

fun color ninu colors {
    Ose.color(color);
    Irosu.fo("?");
}

Ose.style("reset");
Irosu.fo("");
Irosu.fo("Rainbow complete!");