Don't crash when joining a game after asset installation.
This commit is contained in:
committed by
Pavel Penev
parent
0f90713aba
commit
648c56bca1
@@ -33,8 +33,6 @@ namespace OpenRA.Widgets
|
||||
public static Widget KeyboardFocusWidget;
|
||||
public static Widget MouseOverWidget;
|
||||
|
||||
internal static Translation Translation;
|
||||
|
||||
public static void CloseWindow()
|
||||
{
|
||||
if (WindowList.Count > 0)
|
||||
@@ -158,27 +156,6 @@ namespace OpenRA.Widgets
|
||||
HandleInput(new MouseInput(MouseInputEvent.Move, MouseButton.None,
|
||||
Viewport.LastMousePos, int2.Zero, Modifiers.None, 0));
|
||||
}
|
||||
|
||||
public static void InitializeTranslation()
|
||||
{
|
||||
Translation = new Translation(Game.Settings.Player.Language, Game.ModData.Manifest.Translations, Game.ModData.DefaultFileSystem);
|
||||
}
|
||||
|
||||
public static string Translate(string key, IDictionary<string, object> args = null, string attribute = null)
|
||||
{
|
||||
if (Translation == null)
|
||||
return null;
|
||||
|
||||
return Translation.GetFormattedMessage(key, args, attribute);
|
||||
}
|
||||
|
||||
public static string TranslationAttribute(string key, string attribute = null)
|
||||
{
|
||||
if (Translation == null)
|
||||
return null;
|
||||
|
||||
return Translation.GetAttribute(key, attribute);
|
||||
}
|
||||
}
|
||||
|
||||
public class ChromeLogic : IDisposable
|
||||
|
||||
Reference in New Issue
Block a user