public override void ModifyInterfaceLayers(List <GameInterfaceLayer> layers) { //if (CheatSheetLoaded) return; int inventoryLayerIndex = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Mouse Text")); if (inventoryLayerIndex != -1) { layers.Insert(inventoryLayerIndex, new LegacyGameInterfaceLayer( "RecipeBrowser: UI", delegate { //if (!CheatSheetLoaded) { if (lastSeenScreenWidth != Main.screenWidth || lastSeenScreenHeight != Main.screenHeight) { recipeBrowserTool.ScreenResolutionChanged(); lastSeenScreenWidth = Main.screenWidth; lastSeenScreenHeight = Main.screenHeight; } recipeBrowserTool.UIUpdate(); recipeBrowserTool.UIDraw(); } return(true); }, InterfaceScaleType.UI) ); } }
public override void UpdateUI(GameTime gameTime) { // By doing these triggers here, we can use them even if autopaused. if (Main.netMode == 0 && (Main.playerInventory || Main.npcChatText != "" || Main.player[Main.myPlayer].sign >= 0 || Main.ingameOptionsWindow || Main.inFancyUI) && Main.autoPause) { Main.LocalPlayer.GetModPlayer <RecipeBrowserPlayer>().ProcessTriggers(null); } recipeBrowserTool?.UIUpdate(gameTime); }
public override void UpdateUI(GameTime gameTime) { recipeBrowserTool?.UIUpdate(gameTime); }