★ APPLICATIONS ★ CREATION GRAPHIQUE ★ Boxes, Borders & Large Characters ★ |
Boxes, Borders & Large Characters (The Amstrad User) | Applications Creation Graphique |
A couple of months ago, Ian Barnes presented two short routines that would produce shadowed and highlighted text, for use in menus or title pages. I have developed three routines that will add a bit more life to those menus. The three routines are; a box, a border and large characters. They were originally one liners, but have been expanded to make them easier to read. BOX This routine simply needs the length, width, x and y coordinates and the colour of the box. The pen colour is set, the starting location is also set (Line 1100), then the top line of the box is then drawn, including the top right and left comers. The cursor is set to the bottom row and then the bottom line is draw, again including the corners. The last step in the construction of the box is to draw the two sides this is done by going through a loop (Lines 1130 to 1170). BORDER The routine which I use all the time is the border routine, I never write a data base without having a border around every screen. This routine is designed to work in any of the three modes by simply passing the amount of columns into the variable 'xl' and changing into the required mode before passing to the routine. Although the box and border routines are different, the box routine can be used to draw a border, however is much slower in doing so. LARGE CHARACTERS (Listing 3) How many times have you seen a double height characters routine? Well personally I have seen three others than this one and all are entirely different. This routine is probably a little difficult to explain, and if you could understand an explanation, you probably wouldn't need one. But take my word for it, it does work. Again you must pass the colour and the x and y coordinates and the message to be printed. The message must be held in the variable 'titles'. The routine starts from line 1140.
|