How do I change the borders of the text boxes?
In this article we're going to see the various ways to change the colors and the appearance of the borders of the text box.
Changing the borders of text boxes created under custom
To change the box styles, go to Edit Box Styles in the Edit Graphics menu. The textbox style used by default is style 0.
It is composed of
box style color #allows you to change the color of the body of the text box box style border box style border image
To make our test we're going to work on box style n°2. The option we need is box style border so go until you see
box style 2 border 60
To change the color we just need to change 60 by another figure. Let's say you want yellow borders. So key in 16.
box style 2 border 16
There a small sample text box on the top right corner.
Now we need to give the demo text box the correct style so that you can use it in your game. Go back and edit the text boxes. Pick up a free one. Let's say text box 70. Edit the appearance and get down. Change value and put
box style 2
You have finished and can know save your game. Feel free to give this text box to a sample NPC and make him speak.
Changing the borders of boxes (rectangle slices) created with plotscripting
Sometimes when you need to create a text box with plotscripting you also need to be able to change the color of the borders. Here is how to do it.
plotscript, sample text box, begin variable (slice) slice := create rect (140, 150, 2) #the third figure in the parenthesis corresponds to box style end
Give the script "sample text box" to an NPC and test the whole thing. You may be happy to know that you can change the box style through plotscripting. The command is called
set rect style (handle, style)
In the case of your example if we would like to change from style 2 to style 4 this would become
set rect style (slice, 4)
Changing the box borders
This time we'll change a box style border image. Go back to the graphics and create a new box borders set. Use the default one an indication to see how you need to draw them, or start from a copy of it. This new box border set should have ID number 1.
Before you modify box style 0, realise that it's used in a lot of places that you can't control (see Box Styles). So let's change box style n°3. Go down until you can read
box style 3 border image: 0
As you can guest wee need to change this to
box style 3 border image: 1
Now back and pick up a free text box. Give it box style 3. You will see nice blank (line) borders appearing ! Save your game! You have finished!
If you have made you own menu and/or mini game you also want you menus to have the same texte box style to your dialogues boxes and your menu. You can easily do that after using the background function of the menu.
Launch custom.exe and edit the menu. Pick up the menu you need to adapt the style and go down on background. By default you can see
background 0 #the menu have the same box style as the dialogue boxes by defaults.
In the example above we modified box style 3 so that it can use images (box edges) as borders for the text boxes. You can do that to the menu by changing
background 3 #the menu uses box style 3 defined on the master palettes sub menu
Advice to remember
- Box style 0 is used for all the text boxes and various menus by default. So think twice before modifying
it because it the modifications will affect all the text boxes at the same time.
- Each style has a harmony between the border line and the color inside the box. Generally
you have a nice light color (red, green, yellow) for the border and the same color is repeated ( but the tone chosen is a bit darker compared with the one used for the borders)
- Remember that you have access to 255 differents colors which make a lot of possibilites. It is perfectly possible
that the 15 different styles which have been pre-defined does not suit you. Feel free to make as many tests as you need!