Bug D3D9 VC Texture Issue

tl8

Addon Developer
Addon Developer
Tutorial Publisher
Joined
Oct 16, 2007
Messages
3,645
Reaction score
25
Points
88
Location
Gold Coast QLD
Hi All

I have a display in the VC of my tug. The problem is that the texture is not showing up. All that I see is a thin blue line around the edge. The whole display should be that blue colour.

Another problem is that the word start is not being shown. Other texts show up, but not Start.

I can deal with the black texture, but not the missing Start text. Any ideas? Could this issue be related to my other problem?


Code:
oapi::Font *parmFont = oapiCreateFont (32, true, "Sans", FONT_BOLD);
    oapi::Font *startFont = oapiCreateFont (80, true, "Sans", FONT_BOLD);
    oapi::Pen *buttonPen = oapiCreatePen(1,4,0xFFFFFF);
    oapi::Sketchpad *skp = oapiGetSketchpad (surf);
    skp->SetTextColor(0xFFFFFF);

    
    if(starter){
        skp->SetFont(parmFont);
        char vesselName[32] = "";
        char text[48];
        switch (JBT_B1200::mode) {
            case -2 :    skp->Text(5,5,"Towbar Attached to: Rear",24);
                        oapiGetObjectName(GetAttachmentStatus(back),vesselName,32); 

                        strcpy(text,"Vessel Attached:");
                        strcat(text,vesselName);
                        skp->Text(5,30,text,strlen(text));
                        skp->Text(45,260,"Detach Vessel | Detach Towbar",29);
                        skp->Text(180,300,"Back  |  Back",13);

                        break;

            case -1 :    skp->Text(5,5,"Towbar Attached to: Rear",24);
                        skp->Text(37,260,"Attach Vessel to | Detach Towbar",33);
                        skp->Text(180,300,"Back  |  Back",13);
                        break;

            case 0 :    
                        skp->Text(140,260,"Attach Towbar to",16);
                        skp->Text(175,300,"Front  |  Back",14);
                        break;

            case 1 :    skp->Text(5,5,"Towbar Attached to: Front",25);
                        skp->Text(35,260,"Attach Vessel to | Detach Towbar",33);
                        skp->Text(170,300,"Front  |  Front",15);
                        break;

            case 2 :    skp->Text(5,5,"Towbar Attached to: Front",25);
                        oapiGetObjectName(GetAttachmentStatus(front),vesselName,32); 
                        strcpy(text,"Vessel Attached:");
                        strcat(text,vesselName);
                        skp->Text(5,30,text,strlen(text));
                        skp->Text(50,260,"Detach Vessel | Detach Towbar",29);
                        skp->Text(170,300,"Front  |  Front",15);
                        break;
            }//switch
    }
    else{
        skp->SetFont(startFont);
        skp->Text(130,250,"START",5);
        skp->SetPen(buttonPen);
        skp->Line(80,335,80,240);
        skp->Line(420,335,420,240);
        skp->Line(80,240,420,240);
    }
 

Attachments

  • jbtscreenproblem.jpg
    jbtscreenproblem.jpg
    85.1 KB · Views: 23

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,627
Reaction score
2,345
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
Are you painting directly on the texture? if yes, try creating your own surface and paint on this. When done, bitblt your own surface to the texture. The drawing functions of Sketchpad don't work well on textures.
 
Top