I can't get this to work, I'm trying to ake it change the gui, without using a different gui window.
PHP Code:
//#CLIENTSIDE
function onCreated()
{
refresh();
}
function refresh()
{
start_gui.showtop();
if(this.mode==0)
{
this.txt_text = "Welcome to Dark Rival! \nThe land has been taken over by an evil king, who wishes to rule the world. The most famous hero in the land has vanished, and now you must pick up where he left off, and defeat Ceverous.\nPress continue to move on.";
this.txt_posx = 7;
this.txt_posy = 24;
this.txt_extx = 385;
this.txt_exty = 100;
}
if(this.mode==1)
{
this.txt_text = "Select your gender, this will have no effect on your stats";
this.txt_posx = 7;
this.txt_posy = 24;
this.txt_extx = 385;
this.txt_exty = 100;
}
new GuiWindowCtrl("start_gui")
{
canResize = false;
canMove = true;
canMaximize = false;
position = {screenwidth/5, screenheight/5};
extent = {400,300};
text = "Dark Rival start screen";
new GuiMLTextCtrl("start_text")
{
position = {this.txt_posx, this.txt_posy};
extent = {this.txt_extx, this.txt_exty};
text = this.txt_text;
}
if(this.mode==0)
{
new GuiButtonCtrl("start_continue")
{
position = {7, 100};
extent = {385, 30};
text = "Continue";
}
}
else if(this.mode==1)
{
new GuiButtonCtrl("start_male")
{
position = {7, 100};
extent = {193, 30};
text = "Male";
}
new GuiButtonCtrl("start_female")
{
position = {200, 100};
extent = {193, 30};
text = "Female";
}
}
}
}
function start_continue.onAction()
{
this.mode++;
refresh();
}
Something stupid I'm sure