Page 1 of 1

SCENUI

Posted: Fri Oct 22, 2010 12:12 pm
by junk2drive
I noticed that my (and other people) have briefing text that doesn't quite fit in the text box. I opened a few SCENUIxxx.txt to see how they work. Here is an example of line B

[munda1textb_back]
type image
x 150
y 105
width 1
height 1
file back_shadow.dds
//Rescale

[munda1textb]
type text
x 155
y 110
width 400
height 110
string IDS_Scenario_desc_munda1_b
textleft 165
textwidth 385
texttop 115
colour ff000000
font TooltipFont
file text_window.dds
Rescale
windowedback 10
parent munda1textb_back

The back is the box that your text goes on in your briefing screen. The x and y are where the box will be placed. Notice that the other numbers are 5 higher than the previous item. That is the spacing so that your text is in the box, not on the edge. Notice the width of the text is 5 less than the box and the text top is 5 more than the height.

If you find that your text overruns the box or the box is not where you want it, change these numbers. You may have to trial and error for a bit.

For x and y, you can take a screenshot of your briefing, open it in your paint program, and use the mouse pointer to see where the x and y are.

Posted: Fri Oct 22, 2010 1:00 pm
by IainMcNeil
The text boxes will auto size if you set them up right.

Set the text height to be 25 - this is the minimum height of the box and it will add lines as needed. This can be added anywhere but for neatness do it under the texttop line.

textheight 25

I've just done a pss on the latest version of the game and you'll probably find all the text boxes in the mission we created are set to do this now instead of having to size them by hand.

Posted: Fri Oct 22, 2010 1:05 pm
by junk2drive
I posted this after trying the download content feature and noticed in the DaveyJJ campaign the bottom text is over the box line.

Posted: Fri Oct 22, 2010 2:42 pm
by pipfromslitherine
The issue was that the original game files were not set up correctly, but we didn't notice until we started some localisation which made the text larger.

So older scenarios (which are C+P from the older UI files) will over-run. But if you build new UI from the updated versions you will see that the text boxes will autosize correctly.

Cheers

Pip

Posted: Fri Oct 22, 2010 2:48 pm
by junk2drive
Good news. That will save me a lot of messing about.