Game Development Community

GuiTextListCtrl

by Howard Dortch · in Torque Game Engine · 02/03/2006 (11:43 am) · 2 replies

I just noticed I had posted this in a public area so I will post it here instead.

I have a little problem with the GuiTextListCtrl as well. I created an onscreen (playgui) GuiTextListCtrl and what I want to do is show the player name with their current score. In the playgui.gui I have this :

new GuiTextListCtrl(RedPlayList) {
profile = "MedRedTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "115 20";
minExtent = "8 2";
visible = "1";
enumerate = "0";
resizeCell = "1";
columns = "0 100";
fitParentWidth = "0";
clipColumnText = "0";
};

now when the score changes I do this

function changeScore(%clientId,%score)

%text = RedTeamList.getRowTextById(%clientId);
%text = setField(%text,1,%score);
RedTeamList.setRowById(%clientId, %text);

it always prints a 0 no matter the value for score.

I put in a echo right after %text = setField(%text,1,%score);
echo(%text);
and it prints to the console "Player ^2"; or what ever the score is. The display still shows Player 0

any clues?

#1
02/03/2006 (12:05 pm)
Just a guess, but does it have anything to do with the fact that the Gui control is called "RedPlayList" and your code refers to it as "RedTeamList"?
#2
02/03/2006 (1:39 pm)
Actually that was a copy paste error they are both referencing the same thing. my bad