C# Class OpenRA.Mods.Common.Widgets.Logic.LobbyUtils

Show file Open project: pchote/OpenRA Class Usage Examples

Public Methods

Method Description
AddPlayerFlagAndName ( OpenRA.Widgets.ScrollItemWidget template, System.Net.Player player ) : void
DescriptiveIpAddress ( string ip ) : string
GetExternalIP ( int clientIndex, OrderManager orderManager ) : string
GetSpawnOccupants ( IEnumerable players, MapPreview preview ) : SpawnOccupant>.Dictionary
GetSpawnOccupants ( Session lobbyInfo, MapPreview preview ) : SpawnOccupant>.Dictionary
LatencyColor ( Session ping ) : Color
LatencyDescription ( Session ping ) : string
SelectSpawnPoint ( OrderManager orderManager, OpenRA.Widgets.MapPreviewWidget mapPreview, MapPreview preview, MouseInput mi ) : void
SetupClientWidget ( OpenRA.Widgets.Widget parent, Session c, OrderManager orderManager, bool visible ) : void
SetupColorWidget ( OpenRA.Widgets.Widget parent, Session s, Session c ) : void
SetupEditableColorWidget ( OpenRA.Widgets.Widget parent, Session s, Session c, OrderManager orderManager, World world, ColorPreviewManagerWidget colorPreview ) : void
SetupEditableFactionWidget ( OpenRA.Widgets.Widget parent, Session s, Session c, OrderManager orderManager, LobbyFaction>.Dictionary factions ) : void
SetupEditableNameWidget ( OpenRA.Widgets.Widget parent, Session s, Session c, OrderManager orderManager ) : void
SetupEditableReadyWidget ( OpenRA.Widgets.Widget parent, Session s, Session c, OrderManager orderManager, MapPreview map ) : void
SetupEditableSlotWidget ( LobbyLogic logic, OpenRA.Widgets.Widget parent, Session s, Session c, OrderManager orderManager ) : void
SetupEditableSpawnWidget ( OpenRA.Widgets.Widget parent, Session s, Session c, OrderManager orderManager, MapPreview map ) : void
SetupEditableTeamWidget ( OpenRA.Widgets.Widget parent, Session s, Session c, OrderManager orderManager, MapPreview map ) : void
SetupFactionWidget ( OpenRA.Widgets.Widget parent, Session s, Session c, LobbyFaction>.Dictionary factions ) : void
SetupKickSpectatorsWidget ( OpenRA.Widgets.Widget parent, OrderManager orderManager, OpenRA.Widgets.Widget lobby, System.Action before, System.Action after, bool skirmishMode ) : void
SetupKickWidget ( OpenRA.Widgets.Widget parent, Session s, Session c, OrderManager orderManager, OpenRA.Widgets.Widget lobby, System.Action before, System.Action after ) : void
SetupNameWidget ( OpenRA.Widgets.Widget parent, Session s, Session c ) : void
SetupReadyWidget ( OpenRA.Widgets.Widget parent, Session s, Session c ) : void
SetupSlotWidget ( OpenRA.Widgets.Widget parent, Session s, Session c ) : void
SetupSpawnWidget ( OpenRA.Widgets.Widget parent, Session s, Session c ) : void
SetupTeamWidget ( OpenRA.Widgets.Widget parent, Session s, Session c ) : void
ShowColorDropDown ( DropDownButtonWidget color, Session client, OrderManager orderManager, World world, ColorPreviewManagerWidget preview ) : void
ShowFactionDropDown ( DropDownButtonWidget dropdown, Session client, OrderManager orderManager, LobbyFaction>.Dictionary factions ) : void
ShowSlotDropDown ( LobbyLogic logic, DropDownButtonWidget dropdown, Session slot, Session client, OrderManager orderManager ) : void
ShowSpawnDropDown ( DropDownButtonWidget dropdown, Session client, OrderManager orderManager, IEnumerable spawnPoints ) : void
ShowTeamDropDown ( DropDownButtonWidget dropdown, Session client, OrderManager orderManager, int teamCount ) : void

Private Methods

Method Description
SetSpawnPoint ( OrderManager orderManager, Session playerToMove, int selectedSpawn ) : void

Method Details

AddPlayerFlagAndName() public static method

public static AddPlayerFlagAndName ( OpenRA.Widgets.ScrollItemWidget template, System.Net.Player player ) : void
template OpenRA.Widgets.ScrollItemWidget
player System.Net.Player
return void

DescriptiveIpAddress() public static method

public static DescriptiveIpAddress ( string ip ) : string
ip string
return string

GetExternalIP() public static method

public static GetExternalIP ( int clientIndex, OrderManager orderManager ) : string
clientIndex int
orderManager OpenRA.Network.OrderManager
return string

GetSpawnOccupants() public static method

public static GetSpawnOccupants ( IEnumerable players, MapPreview preview ) : SpawnOccupant>.Dictionary
players IEnumerable
preview MapPreview
return SpawnOccupant>.Dictionary

GetSpawnOccupants() public static method

public static GetSpawnOccupants ( Session lobbyInfo, MapPreview preview ) : SpawnOccupant>.Dictionary
lobbyInfo OpenRA.Network.Session
preview MapPreview
return SpawnOccupant>.Dictionary

LatencyColor() public static method

public static LatencyColor ( Session ping ) : Color
ping OpenRA.Network.Session
return Color

LatencyDescription() public static method

public static LatencyDescription ( Session ping ) : string
ping OpenRA.Network.Session
return string

SelectSpawnPoint() public static method

public static SelectSpawnPoint ( OrderManager orderManager, OpenRA.Widgets.MapPreviewWidget mapPreview, MapPreview preview, MouseInput mi ) : void
orderManager OpenRA.Network.OrderManager
mapPreview OpenRA.Widgets.MapPreviewWidget
preview MapPreview
mi MouseInput
return void

SetupClientWidget() public static method

public static SetupClientWidget ( OpenRA.Widgets.Widget parent, Session c, OrderManager orderManager, bool visible ) : void
parent OpenRA.Widgets.Widget
c OpenRA.Network.Session
orderManager OpenRA.Network.OrderManager
visible bool
return void

SetupColorWidget() public static method

public static SetupColorWidget ( OpenRA.Widgets.Widget parent, Session s, Session c ) : void
parent OpenRA.Widgets.Widget
s OpenRA.Network.Session
c OpenRA.Network.Session
return void

SetupEditableColorWidget() public static method

public static SetupEditableColorWidget ( OpenRA.Widgets.Widget parent, Session s, Session c, OrderManager orderManager, World world, ColorPreviewManagerWidget colorPreview ) : void
parent OpenRA.Widgets.Widget
s OpenRA.Network.Session
c OpenRA.Network.Session
orderManager OpenRA.Network.OrderManager
world World
colorPreview ColorPreviewManagerWidget
return void

SetupEditableFactionWidget() public static method

public static SetupEditableFactionWidget ( OpenRA.Widgets.Widget parent, Session s, Session c, OrderManager orderManager, LobbyFaction>.Dictionary factions ) : void
parent OpenRA.Widgets.Widget
s OpenRA.Network.Session
c OpenRA.Network.Session
orderManager OpenRA.Network.OrderManager
factions LobbyFaction>.Dictionary
return void

SetupEditableNameWidget() public static method

public static SetupEditableNameWidget ( OpenRA.Widgets.Widget parent, Session s, Session c, OrderManager orderManager ) : void
parent OpenRA.Widgets.Widget
s OpenRA.Network.Session
c OpenRA.Network.Session
orderManager OpenRA.Network.OrderManager
return void

SetupEditableReadyWidget() public static method

public static SetupEditableReadyWidget ( OpenRA.Widgets.Widget parent, Session s, Session c, OrderManager orderManager, MapPreview map ) : void
parent OpenRA.Widgets.Widget
s OpenRA.Network.Session
c OpenRA.Network.Session
orderManager OpenRA.Network.OrderManager
map MapPreview
return void

SetupEditableSlotWidget() public static method

public static SetupEditableSlotWidget ( LobbyLogic logic, OpenRA.Widgets.Widget parent, Session s, Session c, OrderManager orderManager ) : void
logic LobbyLogic
parent OpenRA.Widgets.Widget
s OpenRA.Network.Session
c OpenRA.Network.Session
orderManager OpenRA.Network.OrderManager
return void

SetupEditableSpawnWidget() public static method

public static SetupEditableSpawnWidget ( OpenRA.Widgets.Widget parent, Session s, Session c, OrderManager orderManager, MapPreview map ) : void
parent OpenRA.Widgets.Widget
s OpenRA.Network.Session
c OpenRA.Network.Session
orderManager OpenRA.Network.OrderManager
map MapPreview
return void

SetupEditableTeamWidget() public static method

public static SetupEditableTeamWidget ( OpenRA.Widgets.Widget parent, Session s, Session c, OrderManager orderManager, MapPreview map ) : void
parent OpenRA.Widgets.Widget
s OpenRA.Network.Session
c OpenRA.Network.Session
orderManager OpenRA.Network.OrderManager
map MapPreview
return void

SetupFactionWidget() public static method

public static SetupFactionWidget ( OpenRA.Widgets.Widget parent, Session s, Session c, LobbyFaction>.Dictionary factions ) : void
parent OpenRA.Widgets.Widget
s OpenRA.Network.Session
c OpenRA.Network.Session
factions LobbyFaction>.Dictionary
return void

SetupKickSpectatorsWidget() public static method

public static SetupKickSpectatorsWidget ( OpenRA.Widgets.Widget parent, OrderManager orderManager, OpenRA.Widgets.Widget lobby, System.Action before, System.Action after, bool skirmishMode ) : void
parent OpenRA.Widgets.Widget
orderManager OpenRA.Network.OrderManager
lobby OpenRA.Widgets.Widget
before System.Action
after System.Action
skirmishMode bool
return void

SetupKickWidget() public static method

public static SetupKickWidget ( OpenRA.Widgets.Widget parent, Session s, Session c, OrderManager orderManager, OpenRA.Widgets.Widget lobby, System.Action before, System.Action after ) : void
parent OpenRA.Widgets.Widget
s OpenRA.Network.Session
c OpenRA.Network.Session
orderManager OpenRA.Network.OrderManager
lobby OpenRA.Widgets.Widget
before System.Action
after System.Action
return void

SetupNameWidget() public static method

public static SetupNameWidget ( OpenRA.Widgets.Widget parent, Session s, Session c ) : void
parent OpenRA.Widgets.Widget
s OpenRA.Network.Session
c OpenRA.Network.Session
return void

SetupReadyWidget() public static method

public static SetupReadyWidget ( OpenRA.Widgets.Widget parent, Session s, Session c ) : void
parent OpenRA.Widgets.Widget
s OpenRA.Network.Session
c OpenRA.Network.Session
return void

SetupSlotWidget() public static method

public static SetupSlotWidget ( OpenRA.Widgets.Widget parent, Session s, Session c ) : void
parent OpenRA.Widgets.Widget
s OpenRA.Network.Session
c OpenRA.Network.Session
return void

SetupSpawnWidget() public static method

public static SetupSpawnWidget ( OpenRA.Widgets.Widget parent, Session s, Session c ) : void
parent OpenRA.Widgets.Widget
s OpenRA.Network.Session
c OpenRA.Network.Session
return void

SetupTeamWidget() public static method

public static SetupTeamWidget ( OpenRA.Widgets.Widget parent, Session s, Session c ) : void
parent OpenRA.Widgets.Widget
s OpenRA.Network.Session
c OpenRA.Network.Session
return void

ShowColorDropDown() public static method

public static ShowColorDropDown ( DropDownButtonWidget color, Session client, OrderManager orderManager, World world, ColorPreviewManagerWidget preview ) : void
color DropDownButtonWidget
client OpenRA.Network.Session
orderManager OpenRA.Network.OrderManager
world World
preview ColorPreviewManagerWidget
return void

ShowFactionDropDown() public static method

public static ShowFactionDropDown ( DropDownButtonWidget dropdown, Session client, OrderManager orderManager, LobbyFaction>.Dictionary factions ) : void
dropdown DropDownButtonWidget
client OpenRA.Network.Session
orderManager OpenRA.Network.OrderManager
factions LobbyFaction>.Dictionary
return void

ShowSlotDropDown() public static method

public static ShowSlotDropDown ( LobbyLogic logic, DropDownButtonWidget dropdown, Session slot, Session client, OrderManager orderManager ) : void
logic LobbyLogic
dropdown DropDownButtonWidget
slot OpenRA.Network.Session
client OpenRA.Network.Session
orderManager OpenRA.Network.OrderManager
return void

ShowSpawnDropDown() public static method

public static ShowSpawnDropDown ( DropDownButtonWidget dropdown, Session client, OrderManager orderManager, IEnumerable spawnPoints ) : void
dropdown DropDownButtonWidget
client OpenRA.Network.Session
orderManager OpenRA.Network.OrderManager
spawnPoints IEnumerable
return void

ShowTeamDropDown() public static method

public static ShowTeamDropDown ( DropDownButtonWidget dropdown, Session client, OrderManager orderManager, int teamCount ) : void
dropdown DropDownButtonWidget
client OpenRA.Network.Session
orderManager OpenRA.Network.OrderManager
teamCount int
return void