internal static void InvokeInitialize(object sender, EventArgsOnGameInitialised eventArgsOnGameInitialised) { try { EventCommon.SafeInvoke(Initialize, sender); } catch (Exception ex) { Log.AsyncR("An exception occured in XNA Initialize: " + ex); } }
public void OnAfterGameInitialise(object sender, EventArgsOnGameInitialised e) { var test = ModRegistry.GetRegisteredItems(); var texture = ModSettings.GetTexture("icon_menuModsButton"); Farmhand.UI.TitleMenu.RegisterNewTitleButton(new Farmhand.UI.TitleMenu.CustomTitleOption { Key = "Mods", Texture = texture, TextureSourceRect = new Rectangle(222, 187, 74, 58), OnClick = OnModMenuItemClicked }); }
public void OnAfterGameInitialise(object sender, EventArgsOnGameInitialised e) { var test = ModRegistry.GetRegisteredItems(); var texture = ModSettings.GetTexture("icon_menuModsButton"); //var texture2 = Texture2D.FromStream(Game1.graphics.GraphicsDevice, new FileStream("FarmhandContent\\customUI.png", FileMode.Open)); Farmhand.UI.TitleMenu.RegisterNewTitleButton(new Farmhand.UI.TitleMenu.CustomTitleOption { Key = "Mods", Texture = texture, TextureSourceRect = new Rectangle(222, 187, 74, 58), OnClick = OnModMenuItemClicked }); }