- Code: Select all
makeText(msg, x, y, windowIndex, messageIndex);
The windowIndex is important, as is the messageindex. MessageIndex represents the cloneindex of the newly created text actor, but what I'm confarzed about is how in the world to change the text of the newly created actor, based on the variable "msg"
here's what I have so far
- Code: Select all
NameBox("names.0", "Shop Keeper", 12, 0, 2, 0);
NameBox("names.1", "Another name :3", 125, 0, 2, 1);
This for some reason, makes names.0 over-lap names.1 and names.1 not to show up at all?
here's the completed code for everything
- Code: Select all
void NameBox(char *textacotrname, char *texts, int X, int Y, int winIndex, int TextIndex)
{
char tmp[256];
int temp;
Actor *a=getclone(textacotrname); //get the name of the text actor used
if(!temp)
{
CreateActor("names", "icon", "(none)", "(none)", 0, 0, false);
temp=1;
}
sprintf(a->text, texts); //a function used to set the text of a var to another
a->xscreen=winX[winIndex]+10+X;
a->yscreen=winY[winIndex]-2+Y;
setpen(64, 25, 44, 0, a->height);
moveto(a->xscreen, a->yscreen+(a->height/2));
lineto(a->xscreen+a->width, a->yscreen+(a->height/2));
}
It works however if I actually clone the text actors.
AKR:
Nevermind the PM