Text Window, Customised

From Adventure Game Studio | Wiki
Jump to navigation Jump to search

A custom text window can add a touch of personality to your game. Here's how you make one:

http://i264.photobucket.com/albums/ii175/twinmoon_1979/AGS/CustomTextWindow.png

When you make a new text window, there are eight images: four in the corners and one on every side. In the image above, I've outlined the pieces you need.

Creating the images

The corners are in red. Make each one a separate image. Make them as small as possible (as wide as the side and as high as the top / bottom).

The sides are in blue. The sides should be as wide as the corners. If you use a pattern, make them as high as one piece of that pattern. In the image above, there is no pattern, so I'll just make them one pixel high. The top and bottom images should be as high as the corners.

Notice that in the image above there is some shading at the bottom. The bottom images are one pixel higher than the top images because of that shading.

Using them in AGS

Save all eight pieces as a separate image and import into AGS. From the above image, the eight pieces would be: http://i264.photobucket.com/albums/ii175/twinmoon_1979/AGS/CustomTextWindowsImages.png

Assign each image to the right button on the GUI. Don't position them, AGS will do this automatically. Then go to the 'General settings' pane, and check the "Text windows use GUI" box. Enter the number of the number of the text window GUI.

Everytime you use Display (or another command which uses the text window) AGS will calculate the width and height of the text window. The side images (which are in blue in the image at the top of this page) will be repeated to make the box as high and wide as needed.

If you also want to use a background for the custom text window, you can set it as the background for the text window GUI. Note that it will be clipped, not stretched. Make it at least 250x80 pixels to make sure it fills up the whole window.