Game Development Community

About gui refresh changes

by Dimitris Matsouliadis · in Technical Issues · 09/02/2008 (5:09 am) · 1 replies

Hi :)
I am working on a MMORPG(fps combat style) game ...
I use only torque in this try

I have make 3 inventories and i have a fun problem in my gui. Any item that i buy is coming to inventory with the right name and quantity (This is on a textcontrol). The picture not coming in real mode (graphical buttoncontrol) , i need restart the mission to see the new pictures. How i can refresh the graphical button control in a gui in real time with changes the pictures?

here is the function that i say


function setInvHealthItems(%this, %obj)
{
%player = $playernow;

for( %k = 0; %k < 15; %k++ ){

%loadicon = %player.bagHealth[%k];
%iconget = getword(%loadicon, 0);
%posget = getword(%loadicon, 1);

if ( %posget >=1 )
{
%obj = "bag" @ %k;
%obj.Bitmap = "./icons/" @ %iconget @ ".png"; //here is the picture >>> problem in refresh
%obj = "Tbag" @ %k; //here is the quantity on textcontrol >>> no problem in refresh
%obj.text = %posget;
}
}
Canvas.pushDialog( HealthInventory );
}

I have use the "Canvas.pushDialog( HealthInventory );". With this working the refresh of pictures changes but i have some tagles... like i cant set "HealthInventory" to unvisible

Thanks for the time of previus:)

#1
09/02/2008 (1:38 pm)
I found the answer with this ...
Canvas.PopDialog(HealthInventory);
Canvas.PushDialog(HealthInventory);

But i have a problem because for change a bitmap in realtime need to upload and reload the gui...