Answered Newsbar Help

candy

G59 Terrorist
Staff member
Donator
Messages
1,327
Reaction score
763
Points
973
Im using Loz infobox. When I spawn the background works, but the text wont set. anyone know how to fix or what i'm missing?
Code:
drawMenuInfoBar()
{
    self.infoBar["bg"] = self createShader("white", "CENTER", "BOTTOM", 0, 0, 2000, 24, (0,0,0), .8, 2);
    if(self.menu.open)
    {
            self.infoBar["string"] = self drawText(self.infoBar["normalOpen"], "objective", 1.5, "CENTER", "BOTTOM", 0, 0, (1,1,1), 1, 2);
    }
    else
        self.infoBar["string"] = self drawText(self.infoBar["close"], "objective", 1.5, "CENTER", "BOTTOM", 0, 0, (1,1,1), 1, 2);
}
Code:
MenuInit()
{
self thread drawMenuInfoBar();
}
Picture:
58887dc76036e5f682404b28beee9ad1.png
 

Inactive Account

Old CCM Member
Premium Member
Messages
480
Reaction score
240
Points
913
see if you have all function needed for this functions and if it's not work, just try to delete it and add it again (but missed function is probably the problem)
 

RGH Danny

Modder
Messages
67
Reaction score
26
Points
118
And it asks just one times for the opened menu, if its not opened, then you will never see a string. (And it will never be opened when this code asks for it)
 

candy

G59 Terrorist
Staff member
Donator
Messages
1,327
Reaction score
763
Points
973
self.infoBar["normalOpen"] is an empty string.
I have this on spawn, so it shouldn't be.

Code:
self.infoBar["close"] = "Press [{+actionslot 1}] To Open "+getMenuName();
self.infoBar["normalOpen"] = "[{+actionslot 2}] / [{+actionslot 1}] = Scroll    [{+usereload}] = Select    [{+stance}] = Back    [{+melee}] = Close";
 

RGH Danny

Modder
Messages
67
Reaction score
26
Points
118
drawMenuInfoBar()
{

self.infoBar["bg"] = self createShader("white", "CENTER", "BOTTOM", 0, 0, 2000, 24, (0,0,0), .8, 2);
self.infoBar["string"] = self drawText("Your ^1Text", "objective", 1.5, "CENTER", "BOTTOM", 0, 0, (1,1,1), 0, 13);
self.infoBar["string"] setPoint( "CENTER", "BOTTOM", 0, 10);
for(; ; )
{
if(self.menu.open)
{
self.infoBar["string"].alpha = 1;
self.infoBar["bg"].alpha = 0.8;
}
else
{
self.infoBar["string"].alpha = 0;
self.infoBar["bg"].alpha = 0;
}
wait .05;
}
}
 

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
4,998
Reaction score
2,918
Points
1,053
Im using Loz infobox. When I spawn the background works, but the text wont set. anyone know how to fix or what i'm missing?
Code:
drawMenuInfoBar()
{
    self.infoBar["bg"] = self createShader("white", "CENTER", "BOTTOM", 0, 0, 2000, 24, (0,0,0), .8, 2);
    if(self.menu.open)
    {
            self.infoBar["string"] = self drawText(self.infoBar["normalOpen"], "objective", 1.5, "CENTER", "BOTTOM", 0, 0, (1,1,1), 1, 2);
    }
    else
        self.infoBar["string"] = self drawText(self.infoBar["close"], "objective", 1.5, "CENTER", "BOTTOM", 0, 0, (1,1,1), 1, 2);
}
Code:
MenuInit()
{
self thread drawMenuInfoBar();
}
Picture:
58887dc76036e5f682404b28beee9ad1.png
Do you still trying to fix this problem?
 
Top