Merge pull request #5016 from obrakmann/disable-shellmaps

Disable shellmaps temporarily
This commit is contained in:
Matthias Mailänder
2014-04-03 17:56:23 +02:00
4 changed files with 19 additions and 5 deletions

View File

@@ -108,7 +108,9 @@ namespace OpenRA.Graphics
{
RefreshPalette();
if (world.IsShellmap && !Game.Settings.Game.ShowShellmap)
// workaround for #4965
// if (world.IsShellmap && !Game.Settings.Game.ShowShellmap)
if (world.IsShellmap)
return;
var renderables = GenerateRenderables();

View File

@@ -213,7 +213,9 @@ namespace OpenRA
public void Tick()
{
if (!Paused && (!IsShellmap || Game.Settings.Game.ShowShellmap))
// workaround for #4965
// if (!Paused && (!IsShellmap || Game.Settings.Game.ShowShellmap))
if (!Paused && !IsShellmap)
{
WorldTick++;

View File

@@ -20,11 +20,15 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
: base(widget, world)
{
var shellmapDecorations = widget.Get("SHELLMAP_DECORATIONS");
shellmapDecorations.IsVisible = () => menuType != MenuType.None && Game.Settings.Game.ShowShellmap;
// workaround for #4965
// shellmapDecorations.IsVisible = () => menuType != MenuType.None && Game.Settings.Game.ShowShellmap;
shellmapDecorations.IsVisible = () => false;
shellmapDecorations.Get<ImageWidget>("RECBLOCK").IsVisible = () => world.WorldTick / 25 % 2 == 0;
var shellmapDisabledDecorations = widget.Get("SHELLMAP_DISABLED_DECORATIONS");
shellmapDisabledDecorations.IsVisible = () => !Game.Settings.Game.ShowShellmap;
// workaround for #4965
// shellmapDisabledDecorations.IsVisible = () => !Game.Settings.Game.ShowShellmap;
shellmapDisabledDecorations.IsVisible = () => true;
}
}
}

View File

@@ -119,10 +119,16 @@ namespace OpenRA.Mods.RA.Widgets.Logic
BindCheckboxPref(panel, "PIXELDOUBLE_CHECKBOX", ds, "PixelDouble");
BindCheckboxPref(panel, "FRAME_LIMIT_CHECKBOX", ds, "CapFramerate");
BindCheckboxPref(panel, "SHOW_SHELLMAP", gs, "ShowShellmap");
// workaround for #4965
// BindCheckboxPref(panel, "SHOW_SHELLMAP", gs, "ShowShellmap");
BindCheckboxPref(panel, "ALWAYS_SHOW_STATUS_BARS_CHECKBOX", gs, "AlwaysShowStatusBars");
BindCheckboxPref(panel, "TEAM_HEALTH_COLORS_CHECKBOX", gs, "TeamHealthColors");
// workaround for #4965
var shellmapCheckbox = panel.Get<CheckboxWidget>("SHOW_SHELLMAP");
shellmapCheckbox.IsDisabled = () => true;
shellmapCheckbox.IsChecked = () => false;
var languageDropDownButton = panel.Get<DropDownButtonWidget>("LANGUAGE_DROPDOWNBUTTON");
languageDropDownButton.OnMouseDown = _ => ShowLanguageDropdown(languageDropDownButton);
languageDropDownButton.GetText = () => FieldLoader.Translate(ds.Language);