Merge pull request #8752 from obrakmann/optional-target-lines

Added option to turn off rendering of target lines in the settings
This commit is contained in:
Matthias Mailänder
2015-07-20 22:05:05 +02:00
5 changed files with 19 additions and 0 deletions

View File

@@ -140,6 +140,7 @@ namespace OpenRA
public bool UseClassicMouseStyle = false;
public bool AlwaysShowStatusBars = false;
public bool TeamHealthColors = false;
public bool DrawTargetLine = true;
public bool AllowDownloading = true;
public string MapRepository = "http://resource.openra.net/map/";

View File

@@ -64,6 +64,9 @@ namespace OpenRA.Traits
if ((lifetime <= 0 || --lifetime <= 0) && !force)
yield break;
if (!(force || Game.Settings.Game.DrawTargetLine))
yield break;
if (targets == null || targets.Count == 0)
yield break;

View File

@@ -154,6 +154,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
BindCheckboxPref(panel, "FRAME_LIMIT_CHECKBOX", ds, "CapFramerate");
BindCheckboxPref(panel, "SHOW_SHELLMAP", gs, "ShowShellmap");
BindCheckboxPref(panel, "ALWAYS_SHOW_STATUS_BARS_CHECKBOX", gs, "AlwaysShowStatusBars");
BindCheckboxPref(panel, "DISPLAY_TARGET_LINES_CHECKBOX", gs, "DrawTargetLine");
BindCheckboxPref(panel, "TEAM_HEALTH_COLORS_CHECKBOX", gs, "TeamHealthColors");
var languageDropDownButton = panel.Get<DropDownButtonWidget>("LANGUAGE_DROPDOWNBUTTON");

View File

@@ -190,6 +190,13 @@ Container@SETTINGS_PANEL:
Height: 20
Font: Regular
Text: Always Show Status Bars
Checkbox@DISPLAY_TARGET_LINES_CHECKBOX:
X: 310
Y: 245
Width: 200
Height: 20
Font: Regular
Text: Display Target Lines
Label@LOCALIZATION_TITLE:
Y: 265
Width: PARENT_RIGHT

View File

@@ -203,6 +203,13 @@ Background@SETTINGS_PANEL:
Height: 20
Font: Regular
Text: Always Show Status Bars
Checkbox@DISPLAY_TARGET_LINES_CHECKBOX:
X: 310
Y: 265
Width: 200
Height: 20
Font: Regular
Text: Display Target Lines
Label@LOCALIZATION_TITLE:
Y: 270
Width: PARENT_RIGHT