Normal
GUI updatingThank you for the responses to my question, but at the moment I have not yet succeeded in showing something for a few seconds and then showing something else. For example, the code that I use is similar to the code below. I set the label of a control to text A, I wait for 2.5 seconds and then update the label to text B. The result is that text A is never shown and that after 2.5 seconds, text B is immediately shown. So I expect that at the point marked by xxxxxxxxxx there must be some statement that forces the GUI to update itself. I tried things like DoUpdate(),Refresh(), Render(), GUIControl.RefreshControl,.. but none of them seems to actually do something (as explained in the first reply to my original question). What statement should be placed instead of the xxxxxxx's. Thanks in advance for any sugggestions? (without this the memory game is more or less useless, I have now solved it with an extra click from the user to explicitly change the images but this is rather annoying)GUILabelControl Playerlabel=GetControl((int)Controls.CONTROL_PLAYERNAME) as GUILabelControl;playerlabel.Label=”current player is player 1”;xxxxxxxxxxint start=Environment.TickCount;int timepassed=0; while(timepassed<2500){ timepassed=Environment.TickCount-start; //System.Threading.Thread.Sleep(100); }playerlabel.Label=”current player is player 2”;
GUI updating
Thank you for the responses to my question, but at the moment I have not yet succeeded in showing something for a few seconds and then showing something else. For example, the code that I use is similar to the code below. I set the label of a control to text A, I wait for 2.5 seconds and then update the label to text B. The result is that text A is never shown and that after 2.5 seconds, text B is immediately shown. So I expect that at the point marked by xxxxxxxxxx there must be some statement that forces the GUI to update itself. I tried things like DoUpdate(),Refresh(), Render(), GUIControl.RefreshControl,.. but none of them seems to actually do something (as explained in the first reply to my original question). What statement should be placed instead of the xxxxxxx's. Thanks in advance for any sugggestions? (without this the memory game is more or less useless, I have now solved it with an extra click from the user to explicitly change the images but this is rather annoying)
GUILabelControl Playerlabel=GetControl((int)Controls.CONTROL_PLAYERNAME) as GUILabelControl;
playerlabel.Label=”current player is player 1”;
xxxxxxxxxx
int start=Environment.TickCount;
int timepassed=0;
while(timepassed<2500){
timepassed=Environment.TickCount-start;
//System.Threading.Thread.Sleep(100);
}
playerlabel.Label=”current player is player 2”;