Re-enable shellmaps.

This commit is contained in:
Paul Chote
2014-04-13 11:53:09 +12:00
parent e83a21808f
commit fdd4437c52
4 changed files with 5 additions and 19 deletions

View File

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

View File

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

View File

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

View File

@@ -117,16 +117,10 @@ namespace OpenRA.Mods.RA.Widgets.Logic
BindCheckboxPref(panel, "PIXELDOUBLE_CHECKBOX", ds, "PixelDouble");
BindCheckboxPref(panel, "FRAME_LIMIT_CHECKBOX", ds, "CapFramerate");
// workaround for #4965
// BindCheckboxPref(panel, "SHOW_SHELLMAP", gs, "ShowShellmap");
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);