disable button after use
This commit is contained in:
parent
bc1c59448d
commit
906e321320
@ -12,7 +12,7 @@ var KFGUI_Button AdminButton,SpectateButton,SkipTraderButton;
|
|||||||
|
|
||||||
var transient KFGUI_Button PrevButton;
|
var transient KFGUI_Button PrevButton;
|
||||||
var transient int NumButtons,NumButtonRows;
|
var transient int NumButtons,NumButtonRows;
|
||||||
var transient bool bInitSpectate,bOldSpectate;
|
var transient bool bInitSpectate,bOldSpectate,bInitSkipTrader;
|
||||||
|
|
||||||
function InitMenu()
|
function InitMenu()
|
||||||
{
|
{
|
||||||
@ -65,7 +65,15 @@ function bool SkipTraderIsAviable(PlayerReplicationInfo PRI)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
KFGRI = KFGameReplicationInfo(KFPRI.WorldInfo.GRI);
|
KFGRI = KFGameReplicationInfo(KFPRI.WorldInfo.GRI);
|
||||||
return (KFGRI.bMatchHasBegun && KFGRI.bTraderIsOpen && KFPRI.bHasSpawnedIn);
|
if (KFGRI.bMatchHasBegun && KFGRI.bTraderIsOpen && KFPRI.bHasSpawnedIn)
|
||||||
|
{
|
||||||
|
return !bInitSkipTrader;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bInitSkipTrader=false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function ShowMenu()
|
function ShowMenu()
|
||||||
@ -112,6 +120,8 @@ function ButtonClicked( KFGUI_Button Sender )
|
|||||||
break;
|
break;
|
||||||
case 'SkipTrader':
|
case 'SkipTrader':
|
||||||
KFPlayerController(GetPlayer()).RequestSkipTrader();
|
KFPlayerController(GetPlayer()).RequestSkipTrader();
|
||||||
|
bInitSkipTrader=true;
|
||||||
|
SkipTraderButton.SetDisabled(true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -158,6 +168,8 @@ defaultproperties
|
|||||||
XSize=0.8
|
XSize=0.8
|
||||||
YSize=0.8
|
YSize=0.8
|
||||||
|
|
||||||
|
bInitSkipTrader=false
|
||||||
|
|
||||||
Pages.Add((PageClass=Class'UIP_News',Caption="News",Hint="Server news page"))
|
Pages.Add((PageClass=Class'UIP_News',Caption="News",Hint="Server news page"))
|
||||||
Pages.Add((PageClass=Class'UIP_PerkSelection',Caption="Perk",Hint="Select and upgrade your perks"))
|
Pages.Add((PageClass=Class'UIP_PerkSelection',Caption="Perk",Hint="Select and upgrade your perks"))
|
||||||
Pages.Add((PageClass=Class'UIP_Settings',Caption="Settings",Hint="Show additional ServerExt settings"))
|
Pages.Add((PageClass=Class'UIP_Settings',Caption="Settings",Hint="Show additional ServerExt settings"))
|
||||||
|
Loading…
Reference in New Issue
Block a user