Interface IVoteDisplay
Implements callbacks for vote updates, allowing them to be displayed on a HUD or similar.
public interface IVoteDisplay
Methods
PlayerJoinedVote(WarfarePlayer)
Invoked on the game thread when a player joins the vote.
void PlayerJoinedVote(WarfarePlayer player)
Parameters
playerWarfarePlayer
PlayerLeftVote(WarfarePlayer)
Invoked on the game thread when a player leaves the vote.
void PlayerLeftVote(WarfarePlayer player)
Parameters
playerWarfarePlayer
PlayerVoteUpdated(CSteamID, PlayerVoteState, PlayerVoteState)
Invoked when a player enters or changes their vote.
void PlayerVoteUpdated(CSteamID playerId, PlayerVoteState newVote, PlayerVoteState oldVote)
Parameters
playerIdCSteamIDnewVotePlayerVoteStateoldVotePlayerVoteState
VoteFinished(IVoteResult)
Invoked on the game thread when the vote finishes or gets cancelled.
void VoteFinished(IVoteResult result)
Parameters
resultIVoteResult
VoteStarted(in VoteSettings, Func<WarfarePlayer, bool>?)
Invoked on the game thread when the vote first starts.
void VoteStarted(in VoteSettings settings, Func<WarfarePlayer, bool>? playerSelector)
Parameters
settingsVoteSettingsplayerSelectorFunc<WarfarePlayer, bool>