public override void ModifyInterfaceLayers(List <GameInterfaceLayer> layers) { int index = layers.FindIndex(layer => layer.Name.Contains("Resource Bars")); if (index != -1) { layers.Insert(index, new LegacyGameInterfaceLayer( "DBZMOD: Ki Bar", delegate { if (KiBar.visible) { KiBarInterface.Update(Main._drawInterfaceGameTime); kibar.Draw(Main.spriteBatch); } return(true); }, InterfaceScaleType.UI) ); } }
public override void ModifyInterfaceLayers(List <GameInterfaceLayer> layers) { int index = layers.FindIndex(layer => layer.Name.Contains("Resource Bars")); if (index != -1) { layers.Insert(index, new LegacyGameInterfaceLayer( "DBZMOD: Ki Bar", delegate { if (KiBar.visible) { KiBarInterface.Update(Main._drawInterfaceGameTime); kibar.Draw(Main.spriteBatch); } return(true); }, InterfaceScaleType.UI) ); } int index2 = layers.FindIndex(layer => layer.Name.Contains("Resource Bars")); if (index2 != -1) { layers.Insert(index2, new LegacyGameInterfaceLayer( "DBZMOD: Menus", delegate { if (TransMenu.menuvisible) { TransMenuInterface.Draw(Main.spriteBatch, Main._drawInterfaceGameTime); } if (ProgressionMenu.menuvisible) { ProgressionMenuInterface.Draw(Main.spriteBatch, Main._drawInterfaceGameTime); } if (WishMenu.menuvisible) { wishMenuInterface.Draw(Main.spriteBatch, Main._drawInterfaceGameTime); } return(true); }, InterfaceScaleType.UI) ); } int index3 = layers.FindIndex(layer => layer.Name.Contains("Resource Bars")); if (index3 != -1) { layers.Insert(index3, new LegacyGameInterfaceLayer( "DBZMOD: Overload Bar", delegate { if (OverloadBar.visible) { OverloadBarInterface.Update(Main._drawInterfaceGameTime); overloadbar.Draw(Main.spriteBatch); } return(true); }, InterfaceScaleType.UI) ); } }