#define CHAR 6 // number of available characters
#define NAME 7 // length of player's name
int i, j; // i - selected character, j - name length
char array[CHAR]; // available characters
char player_name[NAME]; // name
i = 0;
j = 0;
sprintf(player_name, "");
array[0] = 'A';
array[1] = 'B';
array[2] = 'C';
array[3] = '1';
array[4] = '2';
array[5] = '3';
if (cursor.x - cursor.xprevious == 40) i++;
else if (cursor.x - cursor.xprevious == -40) i--;
else if (cursor.y - cursor.yprevious == 40) i += 3;
else if (cursor.y - cursor.yprevious == -40) i -= 3;
char letter[2]; // input letter will be converted to string
// letter[0] - character, letter[1] - null pointer, end of string
if (i >= 0 && i < CHAR && j < NAME - 1) {
sprintf(letter, "%c", array[i]); // convert input letter
strcat(player_name, letter); // add letter to name
j++;
sprintf(display.text, player_name); // display name
display_cursor.x += 20;
}
Right click on any actor, select Actor Control, and then from list of actors, in Name:, choose display, and then you can change font. The problem is that display is invisible, it is just a space.GuybrushThreepwood wrote:Ok, cool. I think I understand that. The only thing I'm not sure about is how to change the input font. I can change all the text actor fonts, but the input characters are still in the original font. How do I change this?
Users browsing this forum: No registered users and 1 guest