selfsame / mud.tilde.town

a python mud influenced by Inform7
53 stars 10 forks source link

ascii compositor #37

Open selfsame opened 9 years ago

selfsame commented 9 years ago

A utility that can create a text area of a defined size, and composite text layers:

The color would probably be set as an argument when compositing a layer.

tc = TextCanvas(80, 30)

tc.composite([
"+---------------------------+",
"|                           |",
"|                           |",
"+---------------------------+"],
[0, 0], color("cyan"))

tc.composite(["[MENU]"],
[10, 0], color("red"))

This would work well with that paragraph formatter.