-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For historical reasons and for better accessibility.
- Loading branch information
0 parents
commit bc7ca6e
Showing
15 changed files
with
1,224 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
//----------------------------------------------------------- | ||
// KFMapVotingPageX - Modification by Marco | ||
//----------------------------------------------------------- | ||
class KFMapVotingPageX extends ROMapVotingPage; | ||
|
||
// Also allow admins force mapswitch. | ||
final function SendAdminSwitch(GUIComponent Sender) | ||
{ | ||
local int MapIndex,GameConfigIndex; | ||
|
||
if( Sender == lb_VoteCountListBox.List ) | ||
{ | ||
MapIndex = MapVoteCountMultiColumnList(lb_VoteCountListBox.List).GetSelectedMapIndex(); | ||
if( MapIndex>=0 ) | ||
GameConfigIndex = MapVoteCountMultiColumnList(lb_VoteCountListBox.List).GetSelectedGameConfigIndex(); | ||
} | ||
else | ||
{ | ||
MapIndex = MapVoteMultiColumnList(lb_MapListBox.List).GetSelectedMapIndex(); | ||
if( MapIndex>=0 ) | ||
GameConfigIndex = int(co_GameType.GetExtra()); | ||
} | ||
if( MapIndex>=0 ) | ||
MVRI.SendMapVote(MapIndex,-(GameConfigIndex+1)); // Send with negative game index to indicate admin switch. | ||
} | ||
|
||
// Allow admins vote like all other players. | ||
function SendVote(GUIComponent Sender) | ||
{ | ||
local int MapIndex,GameConfigIndex; | ||
|
||
if( Sender == lb_VoteCountListBox.List ) | ||
{ | ||
MapIndex = MapVoteCountMultiColumnList(lb_VoteCountListBox.List).GetSelectedMapIndex(); | ||
if( MapIndex>=0 ) | ||
GameConfigIndex = MapVoteCountMultiColumnList(lb_VoteCountListBox.List).GetSelectedGameConfigIndex(); | ||
} | ||
else | ||
{ | ||
MapIndex = MapVoteMultiColumnList(lb_MapListBox.List).GetSelectedMapIndex(); | ||
if( MapIndex>=0 ) | ||
GameConfigIndex = int(co_GameType.GetExtra()); | ||
} | ||
if( MapIndex>=0 ) | ||
{ | ||
if( MVRI.MapList[MapIndex].bEnabled ) | ||
MVRI.SendMapVote(MapIndex,GameConfigIndex); | ||
else PlayerOwner().ClientMessage(lmsgMapDisabled); | ||
} | ||
} | ||
|
||
DefaultProperties | ||
{ | ||
Begin Object Class=MVCountColumnListBox Name=VoteCountListBox | ||
WinWidth=0.96 | ||
WinHeight=0.223770 | ||
WinLeft=0.02 | ||
WinTop=0.052930 | ||
bVisibleWhenEmpty=true | ||
bScaleToParent=True | ||
bBoundToParent=True | ||
FontScale=FNS_Small | ||
HeaderColumnPerc(0)=0.3 | ||
HeaderColumnPerc(1)=0.3 | ||
HeaderColumnPerc(2)=0.2 | ||
HeaderColumnPerc(3)=0.2 | ||
End Object | ||
lb_VoteCountListBox=VoteCountListBox | ||
|
||
Begin Object Class=MVMultiColumnListBox Name=MapListBox | ||
WinWidth=0.96 | ||
WinHeight=0.293104 | ||
WinLeft=0.02 | ||
WinTop=0.371020 | ||
bVisibleWhenEmpty=true | ||
StyleName="ServerBrowserGrid" | ||
bScaleToParent=True | ||
bBoundToParent=True | ||
FontScale=FNS_Small | ||
HeaderColumnPerc(0)=0.5 | ||
HeaderColumnPerc(1)=0.15 | ||
HeaderColumnPerc(2)=0.15 | ||
HeaderColumnPerc(3)=0.2 | ||
End Object | ||
lb_MapListBox=MapListBox | ||
|
||
Begin Object class=moComboBox Name=GameTypeCombo | ||
WinWidth=0.757809 | ||
WinHeight=0.037500 | ||
WinLeft=0.199219 | ||
WinTop=0.334309 | ||
Caption="Select Game Type:" | ||
CaptionWidth=0.35 | ||
bScaleToParent=True | ||
End Object | ||
co_GameType=GameTypeCombo | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
class KFVoteTimeMessage extends CriticalEventPlus; | ||
|
||
var(Message) localized string TimeString[13]; | ||
|
||
static function string GetString( | ||
optional int Switch, | ||
optional PlayerReplicationInfo RelatedPRI_1, | ||
optional PlayerReplicationInfo RelatedPRI_2, | ||
optional Object OptionalObject ) | ||
{ | ||
Return Default.TimeString[Switch]; | ||
} | ||
|
||
defaultproperties | ||
{ | ||
bIsUnique=True | ||
FontSize=2 | ||
PosY=0.04 | ||
DrawColor=(R=255,G=50,B=50) | ||
bIsConsoleMessage=False | ||
TimeString(0)="1..." | ||
TimeString(1)="2..." | ||
TimeString(2)="3..." | ||
TimeString(3)="4..." | ||
TimeString(4)="5..." | ||
TimeString(5)="6..." | ||
TimeString(6)="7..." | ||
TimeString(7)="8..." | ||
TimeString(8)="9..." | ||
TimeString(9)="10..." | ||
TimeString(10)="20 seconds..." | ||
TimeString(11)="30 seconds left..." | ||
TimeString(12)="1 minute remains!" | ||
} |
Oops, something went wrong.