コード例 #1
0
ファイル: Game.cs プロジェクト: purrplingcat/Stardew-Farmhand
 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);
     }
 }
コード例 #2
0
        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
            });
        }
コード例 #3
0
        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
            });
        }