Add requires-auth indicator to the server lists.

This commit is contained in:
Paul Chote
2018-08-12 13:12:57 +00:00
committed by reaperrr
parent e374c8e6c3
commit 8634c001f9
13 changed files with 70 additions and 16 deletions

View File

@@ -599,6 +599,16 @@ namespace OpenRA.Mods.Common.Widgets.Logic
password.GetImageName = () => canJoin ? "protected" : "protected-disabled"; password.GetImageName = () => canJoin ? "protected" : "protected-disabled";
} }
var auth = item.GetOrNull<ImageWidget>("REQUIRES_AUTHENTICATION");
if (auth != null)
{
auth.IsVisible = () => game.Authentication;
auth.GetImageName = () => canJoin ? "authentication" : "authentication-disabled";
if (game.Protected && password != null)
auth.Bounds.X -= password.Bounds.Width + 5;
}
var players = item.GetOrNull<LabelWithTooltipWidget>("PLAYERS"); var players = item.GetOrNull<LabelWithTooltipWidget>("PLAYERS");
if (players != null) if (players != null)
{ {

View File

@@ -449,8 +449,10 @@ lobby-bits: chrome.png
colorpicker: 257,33,14,14 colorpicker: 257,33,14,14
huepicker: 388,96,7,15 huepicker: 388,96,7,15
kick: 386,115,11,11 kick: 386,115,11,11
protected: 403,97,10,13 protected: 402,97,12,13
protected-disabled: 403,113,10,13 protected-disabled: 402,113,12,13
authentication: 418,97,12,13
authentication-disabled: 418,113,12,13
admin-registered: 448,112,16,16 admin-registered: 448,112,16,16
admin-anonymous: 464,112,16,16 admin-anonymous: 464,112,16,16
player-registered: 480,112,16,16 player-registered: 480,112,16,16

View File

@@ -87,17 +87,26 @@ Container@LOBBY_SERVERS_BIN:
Children: Children:
Label@TITLE: Label@TITLE:
X: 5 X: 5
Width: 255 Width: 245
Height: 25 Height: 25
Image@PASSWORD_PROTECTED: Image@PASSWORD_PROTECTED:
X: 272 X: 272
Y: 6 Y: 6
Width: 8 Width: 12
Height: 10 Height: 13
ImageCollection: lobby-bits ImageCollection: lobby-bits
TooltipContainer: TOOLTIP_CONTAINER TooltipContainer: TOOLTIP_CONTAINER
TooltipTemplate: SIMPLE_TOOLTIP TooltipTemplate: SIMPLE_TOOLTIP
TooltipText: Requires Password TooltipText: Requires Password
Image@REQUIRES_AUTHENTICATION:
X: 272
Y: 6
Width: 12
Height: 13
ImageCollection: lobby-bits
TooltipContainer: TOOLTIP_CONTAINER
TooltipTemplate: SIMPLE_TOOLTIP
TooltipText: Requires OpenRA forum account
LabelWithTooltip@PLAYERS: LabelWithTooltip@PLAYERS:
X: 290 X: 290
Width: 85 Width: 85

View File

@@ -108,17 +108,26 @@ Container@MULTIPLAYER_PANEL:
Children: Children:
Label@TITLE: Label@TITLE:
X: 5 X: 5
Width: 255 Width: 245
Height: 25 Height: 25
Image@PASSWORD_PROTECTED: Image@PASSWORD_PROTECTED:
X: 272 X: 272
Y: 6 Y: 6
Width: 8 Width: 12
Height: 10 Height: 13
ImageCollection: lobby-bits ImageCollection: lobby-bits
TooltipContainer: TOOLTIP_CONTAINER TooltipContainer: TOOLTIP_CONTAINER
TooltipTemplate: SIMPLE_TOOLTIP TooltipTemplate: SIMPLE_TOOLTIP
TooltipText: Requires Password TooltipText: Requires Password
Image@REQUIRES_AUTHENTICATION:
X: 272
Y: 6
Width: 12
Height: 13
ImageCollection: lobby-bits
TooltipContainer: TOOLTIP_CONTAINER
TooltipTemplate: SIMPLE_TOOLTIP
TooltipText: Requires OpenRA forum account
LabelWithTooltip@PLAYERS: LabelWithTooltip@PLAYERS:
X: 290 X: 290
Width: 85 Width: 85

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

After

Width:  |  Height:  |  Size: 93 KiB

View File

@@ -84,17 +84,26 @@ Container@LOBBY_SERVERS_BIN:
Children: Children:
Label@TITLE: Label@TITLE:
X: 5 X: 5
Width: 255 Width: 245
Height: 25 Height: 25
Image@PASSWORD_PROTECTED: Image@PASSWORD_PROTECTED:
X: 272 X: 272
Y: 6 Y: 6
Width: 10 Width: 12
Height: 12 Height: 13
ImageCollection: lobby-bits ImageCollection: lobby-bits
TooltipContainer: TOOLTIP_CONTAINER TooltipContainer: TOOLTIP_CONTAINER
TooltipTemplate: SIMPLE_TOOLTIP TooltipTemplate: SIMPLE_TOOLTIP
TooltipText: Requires Password TooltipText: Requires Password
Image@REQUIRES_AUTHENTICATION:
X: 272
Y: 6
Width: 12
Height: 13
ImageCollection: lobby-bits
TooltipContainer: TOOLTIP_CONTAINER
TooltipTemplate: SIMPLE_TOOLTIP
TooltipText: Requires OpenRA forum account
LabelWithTooltip@PLAYERS: LabelWithTooltip@PLAYERS:
X: 290 X: 290
Width: 85 Width: 85

View File

@@ -100,17 +100,26 @@ Background@MULTIPLAYER_PANEL:
Children: Children:
Label@TITLE: Label@TITLE:
X: 5 X: 5
Width: 255 Width: 245
Height: 25 Height: 25
Image@PASSWORD_PROTECTED: Image@PASSWORD_PROTECTED:
X: 272 X: 272
Y: 6 Y: 6
Width: 10 Width: 12
Height: 12 Height: 13
ImageCollection: lobby-bits ImageCollection: lobby-bits
TooltipContainer: TOOLTIP_CONTAINER TooltipContainer: TOOLTIP_CONTAINER
TooltipTemplate: SIMPLE_TOOLTIP TooltipTemplate: SIMPLE_TOOLTIP
TooltipText: Requires Password TooltipText: Requires Password
Image@REQUIRES_AUTHENTICATION:
X: 272
Y: 6
Width: 12
Height: 13
ImageCollection: lobby-bits
TooltipContainer: TOOLTIP_CONTAINER
TooltipTemplate: SIMPLE_TOOLTIP
TooltipText: Requires OpenRA forum account
LabelWithTooltip@PLAYERS: LabelWithTooltip@PLAYERS:
X: 290 X: 290
Width: 85 Width: 85

View File

@@ -215,6 +215,8 @@ lobby-bits: buttons.png
huepicker: 193,0,7,15 huepicker: 193,0,7,15
protected: 200,0,12,13 protected: 200,0,12,13
protected-disabled: 211,0,12,13 protected-disabled: 211,0,12,13
authentication: 199,16,12,13
authentication-disabled: 212,16,12,13
admin-registered: 224,0,16,16 admin-registered: 224,0,16,16
admin-anonymous: 240,0,16,16 admin-anonymous: 240,0,16,16
player-registered: 224,16,16,16 player-registered: 224,16,16,16

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -531,8 +531,10 @@ lobby-bits: buttons.png
admin: 187,5,7,5 admin: 187,5,7,5
colorpicker: 127,5,23,22 colorpicker: 127,5,23,22
huepicker: 194,0,7,15 huepicker: 194,0,7,15
protected: 202,0,10,13 protected: 201,0,12,13
protected-disabled: 213,0,10,13 protected-disabled: 212,0,12,13
authentication: 199,16,12,13
authentication-disabled: 212,16,12,13
admin-registered: 224,0,16,16 admin-registered: 224,0,16,16
admin-anonymous: 240,0,16,16 admin-anonymous: 240,0,16,16
player-registered: 224,16,16,16 player-registered: 224,16,16,16

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -377,6 +377,8 @@ lobby-bits: buttons.png
huepicker: 194,0,7,15 huepicker: 194,0,7,15
protected: 202,0,10,13 protected: 202,0,10,13
protected-disabled: 213,0,10,13 protected-disabled: 213,0,10,13
authentication: 199,16,12,13
authentication-disabled: 212,16,12,13
admin-registered: 224,0,16,16 admin-registered: 224,0,16,16
admin-anonymous: 240,0,16,16 admin-anonymous: 240,0,16,16
player-registered: 224,16,16,16 player-registered: 224,16,16,16

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 12 KiB