Home   Help Search Login Register  

Author Topic: Titles text not displaying  (Read 470 times)

0 Members and 3 Guests are viewing this topic.

The Avon Lady

  • Guest
Titles text not displaying
« on: 28 Nov 2004, 14:22:02 »
Need some help here. I'm trying to produce a credits cutscene. I copied code from OFP's resource.cpp file in my attempt.

Here's my description.ext file:
Code: [Select]
class RscText
{
   type = CT_STATIC;
   idc = -1;
   style = ST_LEFT;
   h = 0.04;
   colorBackground[] = {0, 0, 0, 0};
   colorText[] = {TextColor, 0.75};
     font = FontS;
   sizeEx = 0.02;
};
class RscTitles
{
   class creditsback
   {
      idd=-1;
      movingEnable = false;
      duration=10000;
      name = "Creditsback";
      controls[]=
      {
         Back, background
      };
      class Back : RscText
      {
         x = 0.72; y = 0.0; w = 0.5; h = 1.0;
         text = "";
         colorBackground[] = {0.0, 0.0, 0.0, 1};
      };
      class Background : RscText
      {
         text =;
         colorBackground[] = {0, 0, 0, 0};
         x = 0; y = 0; w = 1; h = 1;
         colorText[] = {0, 0, 0, 0};
      };
   };      
   class CRtitle : creditsback
   {
      name = "CRtitle";
      controls[]=
      {
         Back, background, work1, name1
      };
      class work1 : RscText
      {
         style = ST_MULTI + ST_CENTER + ST_NO_RECT;
         lineSpacing = 1.0;
         text = $STR_CREDITS01;
         x = 0.36; y = 0.3; w = 1.0; h = 0.73;
         colorText[] = {0.75, 0.75, 1.0, 1};
         font = FontMAINCZ;
         sizeEx = 0.7 * 0.05;
      };
      class name1 : RscText
      {
         style = ST_MULTI + ST_CENTER + ST_NO_RECT;
         lineSpacing = 1.0;
         text = $STR_CREDITSN01;
         x = 0.36; y = 0.35; w = 1.0; h = 0.53;
         colorText[] = {1.0, 1.0, 1.0, 1};
         font = FontMAINCZ;
         sizeEx = 1.1 * 0.05;
      };
   };
};
Here's my stringtable.csv file:
Code: [Select]
COMMENT, Credits, Crédits, Titoli, Colaboradores, Mitarbeiter, Autoøi

STR_CREDITS01,Test Title,Test Title,Test Title,Test Title,Test Title
STR_CREDITSN01,by The Avon Lady,by The Avon Lady,by The Avon Lady,by The Avon Lady,by The Avon Lady

Here's the script to display the background:
Code: [Select]
cutrsc ["creditsback","plain down", 0]

~4

c1=true
~16.2
The black right-side background displays OK, just as in OFP's credits cutscenes. The about script sets variable c1 to true.

There's a trigger in mission.sqm that under condition "c1", the following effects are executed:
Code: [Select]
         class Effects
         {
            titleType="RES";
            title="CRtitle";
         };
This should have displayed the text defined as CRtitle in my description.ext file. Instead I get the following screen:



Where did I go wrong (other than taking on this endeavor in the first place)? What's causing that grey area to appear instead of my text planted neatly in the right hand black vertical column?

TIA! :)

Offline CrashDome

  • Members
  • *
Re:Titles text not displaying
« Reply #1 on: 30 Nov 2004, 09:35:24 »
Not familiar with cutRSC, but I am VERY familiar with dialogs...

Here's problem #1 (I think):
Code: [Select]
     class Back : RscText
      {
         x = 0.72; y = 0.0; w = 0.5; h = 1.0;

Those values are percentages of the screen.
So you are telling it to start at 72% from the left and at 0% from top and then to be 50% wide (runs off of screen because 72 + 50 = 122%) and be full height (100%).

Offline CrashDome

  • Members
  • *
Re:Titles text not displaying
« Reply #2 on: 30 Nov 2004, 09:41:48 »
Looking at it further (without actually using OFP) I can't seem to equate what else is wrong, but I do think it has to do with how they are positioned on screen.

EDIT:  :P It just hit me... The black areas don't matter if they go off the screen but you work areas go WAY off the screen.

Change:
Code: [Select]
   x = 0.36; y = 0.3; w = 1.0; h = 0.73;
to
Code: [Select]
   x = 0.36; y = 0.3; w = 0.28; h = 0.4; for work1

and make the other
Code: [Select]
        x = 0.36; y = 0.35; w = 0.28; h = 0.35;

That should position them more centered. The work1 should have the following also:
Code: [Select]
rowheight = 0.035; and
Code: [Select]
rowheight = 0.055; for name1

which explains why everything is grey (text is filling the area).
« Last Edit: 30 Nov 2004, 09:53:40 by CrashDome »

The Avon Lady

  • Guest
Re:Titles text not displaying
« Reply #3 on: 30 Nov 2004, 11:25:57 »
Thanks for helping. I'm going to continue this subject on this BIS forum thread.

As you can see, I got rid of the gray box but now my text isn't showing up. :(