Fix a collection of mission browser UI issues.

This commit is contained in:
Paul Chote
2023-10-29 11:29:02 +00:00
committed by Gustas
parent 3d9ac5a85e
commit dd95b199b7
5 changed files with 105 additions and 100 deletions

View File

@@ -84,7 +84,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic
var title = widget.GetOrNull<LabelWidget>("MISSIONBROWSER_TITLE");
if (title != null)
title.GetText = () => playingVideo != PlayingVideo.None ? selectedMap.Title : title.Text;
{
var label = TranslationProvider.GetString(title.Text);
title.GetText = () => playingVideo != PlayingVideo.None ? selectedMap.Title : label;
}
widget.Get("MISSION_INFO").IsVisible = () => selectedMap != null;

View File

@@ -2,7 +2,7 @@ Container@GAMESAVE_BROWSER_PANEL:
Logic: GameSaveBrowserLogic
X: (WINDOW_RIGHT - WIDTH) / 2
Y: (WINDOW_BOTTOM - HEIGHT) / 2
Width: 714
Width: 716
Height: 435
Children:
Label@LOAD_TITLE:

View File

@@ -2,7 +2,7 @@ Container@MISSIONBROWSER_PANEL:
Logic: MissionBrowserLogic
X: (WINDOW_RIGHT - WIDTH) / 2
Y: (WINDOW_BOTTOM - HEIGHT) / 2
Width: 714
Width: 716
Height: 435
Children:
Label@MISSIONBROWSER_TITLE:
@@ -20,7 +20,7 @@ Container@MISSIONBROWSER_PANEL:
ScrollPanel@MISSION_LIST:
X: 15
Y: 15
Width: 311
Width: 313
Height: PARENT_BOTTOM - 30
Children:
ScrollItem@HEADER:
@@ -49,7 +49,7 @@ Container@MISSIONBROWSER_PANEL:
TooltipContainer: TOOLTIP_CONTAINER
TooltipTemplate: SIMPLE_TOOLTIP
Container@MISSION_INFO:
X: 337
X: 339
Y: 15
Width: 362
Height: PARENT_BOTTOM - 30
@@ -67,10 +67,25 @@ Container@MISSIONBROWSER_PANEL:
IgnoreMouseOver: True
IgnoreMouseInput: True
ShowSpawnPoints: False
Container@MISSION_TABS:
Width: PARENT_RIGHT
Y: PARENT_BOTTOM - 31
Children:
Button@MISSIONINFO_TAB:
Width: 178
Height: 31
Font: Bold
Text: button-missionbrowser-panel-mission-info
Button@OPTIONS_TAB:
X: 184
Width: 178
Height: 31
Font: Bold
Text: button-missionbrowser-panel-mission-options
Container@MISSION_DETAIL:
Y: 213
Width: PARENT_RIGHT
Height: 170
Height: PARENT_BOTTOM - 213 - 30
Children:
ScrollPanel@MISSION_DESCRIPTION_PANEL:
Height: PARENT_BOTTOM
@@ -119,6 +134,7 @@ Container@MISSIONBROWSER_PANEL:
Y: 25
Height: 25
Visible: False
PanelRoot: MISSION_DROPDOWN_PANEL_ROOT
TooltipContainer: TOOLTIP_CONTAINER
LabelForInput@B_DESC:
X: PARENT_RIGHT / 2 + 5
@@ -132,24 +148,8 @@ Container@MISSIONBROWSER_PANEL:
Y: 25
Height: 25
Visible: False
PanelRoot: MISSION_DROPDOWN_PANEL_ROOT
TooltipContainer: TOOLTIP_CONTAINER
Container@MISSION_TABS:
Width: PARENT_RIGHT
Y: PARENT_BOTTOM - 50
Children:
Button@MISSIONINFO_TAB:
Width: PARENT_RIGHT / 2
Y: 25
Height: 28
Font: Bold
Text: button-missionbrowser-panel-mission-info
Button@OPTIONS_TAB:
X: PARENT_RIGHT / 2
Width: PARENT_RIGHT / 2
Y: 25
Height: 28
Font: Bold
Text: button-missionbrowser-panel-mission-options
Button@BACK_BUTTON:
Y: PARENT_BOTTOM - 1
Width: 140
@@ -204,6 +204,7 @@ Container@MISSIONBROWSER_PANEL:
Y: 1
Width: 684
Height: 402
Container@MISSION_DROPDOWN_PANEL_ROOT:
TooltipContainer@TOOLTIP_CONTAINER:
Background@FULLSCREEN_PLAYER:

View File

@@ -61,13 +61,28 @@ Background@MISSIONBROWSER_PANEL:
IgnoreMouseOver: True
IgnoreMouseInput: True
ShowSpawnPoints: False
Container@MISSION_TABS:
Width: PARENT_RIGHT
Y: PARENT_BOTTOM - 31
Children:
Button@MISSIONINFO_TAB:
Width: PARENT_RIGHT / 2
Height: 31
Font: Bold
Text: button-missionbrowser-panel-mission-info
Button@OPTIONS_TAB:
X: PARENT_RIGHT / 2
Width: PARENT_RIGHT / 2
Height: 31
Font: Bold
Text: button-missionbrowser-panel-mission-options
Container@MISSION_DETAIL:
Y: 212
Width: PARENT_RIGHT
Height: 155
Height: PARENT_BOTTOM - 212
Children:
ScrollPanel@MISSION_DESCRIPTION_PANEL:
Height: PARENT_BOTTOM
Height: PARENT_BOTTOM - 30
Width: PARENT_RIGHT
TopBottomSpacing: 5
Children:
@@ -77,7 +92,7 @@ Background@MISSIONBROWSER_PANEL:
VAlign: Top
Font: Small
ScrollPanel@MISSION_OPTIONS:
Height: PARENT_BOTTOM
Height: PARENT_BOTTOM - 30
Width: PARENT_RIGHT
TopBottomSpacing: 5
Children:
@@ -113,6 +128,7 @@ Background@MISSIONBROWSER_PANEL:
Y: 25
Height: 25
Visible: False
PanelRoot: MISSION_DROPDOWN_PANEL_ROOT
TooltipContainer: TOOLTIP_CONTAINER
LabelForInput@B_DESC:
X: PARENT_RIGHT / 2 + 5
@@ -126,24 +142,8 @@ Background@MISSIONBROWSER_PANEL:
Y: 25
Height: 25
Visible: False
PanelRoot: MISSION_DROPDOWN_PANEL_ROOT
TooltipContainer: TOOLTIP_CONTAINER
Container@MISSION_TABS:
Width: PARENT_RIGHT
Y: PARENT_BOTTOM - 50
Children:
Button@MISSIONINFO_TAB:
Width: PARENT_RIGHT / 2
Y: 25
Height: 28
Font: Bold
Text: button-missionbrowser-panel-mission-info
Button@OPTIONS_TAB:
X: PARENT_RIGHT / 2
Width: PARENT_RIGHT / 2
Y: 25
Height: 28
Font: Bold
Text: button-missionbrowser-panel-mission-options
Button@START_BRIEFING_VIDEO_BUTTON:
X: 20
Y: PARENT_BOTTOM - 45
@@ -199,6 +199,7 @@ Background@MISSIONBROWSER_PANEL:
Y: 1
Width: PARENT_RIGHT - 2
Height: PARENT_BOTTOM - 2
Container@MISSION_DROPDOWN_PANEL_ROOT:
TooltipContainer@TOOLTIP_CONTAINER:
Background@FULLSCREEN_PLAYER:

View File

@@ -2,7 +2,7 @@ Background@MISSIONBROWSER_PANEL:
Logic: MissionBrowserLogic
X: (WINDOW_RIGHT - WIDTH) / 2
Y: (WINDOW_BOTTOM - HEIGHT) / 2
Width: 880
Width: 682
Height: 591
Children:
Label@MISSIONBROWSER_TITLE:
@@ -16,7 +16,7 @@ Background@MISSIONBROWSER_PANEL:
X: 20
Y: 50
Width: 190
Height: 405
Height: 483
Children:
ScrollItem@HEADER:
Background: scrollheader
@@ -42,43 +42,15 @@ Background@MISSIONBROWSER_PANEL:
Height: 25
TooltipContainer: TOOLTIP_CONTAINER
TooltipTemplate: SIMPLE_TOOLTIP
Button@START_BRIEFING_VIDEO_BUTTON:
X: 20
Y: 455
Width: 190
Height: 25
Text: button-missionbrowser-panel-start-briefing-video
Font: Bold
Button@STOP_BRIEFING_VIDEO_BUTTON:
X: 20
Y: 455 + HEIGHT
Width: 190
Height: 25
Text: button-missionbrowser-panel-stop-briefing-video
Font: Bold
Button@START_INFO_VIDEO_BUTTON:
X: 20
Y: 455 + 2 * HEIGHT
Width: 190
Height: 25
Text: button-missionbrowser-panel-start-info-video
Font: Bold
Button@STOP_INFO_VIDEO_BUTTON:
X: 20
Y: 455 + 3 * HEIGHT
Width: 190
Height: 25
Text: button-missionbrowser-panel-stop-info-video
Font: Bold
Container@MISSION_INFO:
X: 220
Y: 50
Width: 642
Height: 800
Width: PARENT_RIGHT - 240
Height: 483
Children:
Background@MISSION_BG:
Width: PARENT_RIGHT
Height: 327
Height: 225
Background: dialog3
Children:
MapPreview@MISSION_PREVIEW:
@@ -89,14 +61,29 @@ Background@MISSIONBROWSER_PANEL:
IgnoreMouseOver: True
IgnoreMouseInput: True
ShowSpawnPoints: False
Container@MISSION_DETAIL:
Y: 337
Container@MISSION_TABS:
Width: PARENT_RIGHT
Height: 146
Y: PARENT_BOTTOM - 31
Children:
Button@MISSIONINFO_TAB:
Width: PARENT_RIGHT / 2
Height: 31
Font: Bold
Text: button-missionbrowser-panel-mission-info
Button@OPTIONS_TAB:
X: PARENT_RIGHT / 2
Width: PARENT_RIGHT / 2
Height: 31
Font: Bold
Text: button-missionbrowser-panel-mission-options
Container@MISSION_DETAIL:
Y: 235
Width: PARENT_RIGHT
Height: PARENT_BOTTOM - 235
Children:
ScrollPanel@MISSION_DESCRIPTION_PANEL:
Height: PARENT_BOTTOM
Width: PARENT_RIGHT
Height: PARENT_BOTTOM - 30
TopBottomSpacing: 5
Children:
Label@MISSION_DESCRIPTION:
@@ -105,8 +92,8 @@ Background@MISSIONBROWSER_PANEL:
VAlign: Top
Font: Small
ScrollPanel@MISSION_OPTIONS:
Height: PARENT_BOTTOM
Width: PARENT_RIGHT
Height: PARENT_BOTTOM - 30
TopBottomSpacing: 5
Children:
Container@CHECKBOX_ROW_TEMPLATE:
@@ -141,6 +128,7 @@ Background@MISSIONBROWSER_PANEL:
Y: 25
Height: 25
Visible: False
PanelRoot: MISSION_DROPDOWN_PANEL_ROOT
TooltipContainer: TOOLTIP_CONTAINER
LabelForInput@B_DESC:
X: PARENT_RIGHT / 2 + 5
@@ -154,25 +142,36 @@ Background@MISSIONBROWSER_PANEL:
Y: 25
Height: 25
Visible: False
PanelRoot: MISSION_DROPDOWN_PANEL_ROOT
TooltipContainer: TOOLTIP_CONTAINER
Container@MISSION_TABS:
Width: 320
X: 220
Y: PARENT_BOTTOM - 84
Children:
Button@MISSIONINFO_TAB:
Width: PARENT_RIGHT / 2
Y: 25
Height: 28
Font: Bold
Text: button-missionbrowser-panel-mission-info
Button@OPTIONS_TAB:
X: PARENT_RIGHT / 2
Width: PARENT_RIGHT / 2
Y: 25
Height: 28
Font: Bold
Text: button-missionbrowser-panel-mission-options
Button@START_BRIEFING_VIDEO_BUTTON:
X: 20
Y: PARENT_BOTTOM - 45
Width: 130
Height: 25
Text: button-missionbrowser-panel-start-briefing-video
Font: Bold
Button@STOP_BRIEFING_VIDEO_BUTTON:
X: 20
Y: PARENT_BOTTOM - 45
Width: 130
Height: 25
Text: button-missionbrowser-panel-stop-briefing-video
Font: Bold
Button@START_INFO_VIDEO_BUTTON:
X: 160
Y: PARENT_BOTTOM - 45
Width: 130
Height: 25
Text: button-missionbrowser-panel-start-info-video
Font: Bold
Button@STOP_INFO_VIDEO_BUTTON:
X: 160
Y: PARENT_BOTTOM - 45
Width: 130
Height: 25
Text: button-missionbrowser-panel-stop-info-video
Font: Bold
Button@STARTGAME_BUTTON:
X: PARENT_RIGHT - 140 - 130
Y: PARENT_BOTTOM - 45
@@ -189,7 +188,7 @@ Background@MISSIONBROWSER_PANEL:
Font: Bold
Key: escape
Background@MISSION_BIN:
X: 220
X: 20
Y: 50
Width: 642
Height: 483
@@ -202,6 +201,7 @@ Background@MISSIONBROWSER_PANEL:
Height: 480
AspectRatio: 1.2
DrawOverlay: False
Container@MISSION_DROPDOWN_PANEL_ROOT:
TooltipContainer@TOOLTIP_CONTAINER:
Background@FULLSCREEN_PLAYER: