d-cubed
d-cubed

Reputation: 1112

Inform7: How to center text?

Looking at the documentation for Inform7, which is a bit scattered, I found some examples of centering text with:

carryout someaction:
     say paragraph break;
     center "Some text to be centered";

But this formulation doesn't seem to work nor does [center].

How do I center text with Inform7? For "say"? For a room description?

Upvotes: 2

Views: 317

Answers (1)

JJJ
JJJ

Reputation: 33163

The center phrase is defined in the built-in extension Basic Screen Effects by Emily Short which you need to include first. Example 369 shows how it works.

Centering a say phrase uses center as in your example. Unfortunately room descriptions are often so long that Inform can't handle them correctly; if the text to be centered is longer than one line it will be left-justified.

Upvotes: 2

Related Questions