public override void ModifyInterfaceLayers(List <GameInterfaceLayer> layers) { int MouseTextIndex = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Mouse Text")); if (MouseTextIndex != -1) { layers.Insert(MouseTextIndex, new LegacyGameInterfaceLayer( "ExampleMod: Coins Per Minute", delegate { if (ExampleUI.visible) { exampleUI.Draw(Main.spriteBatch); } return(true); }, InterfaceScaleType.UI) ); } }
public override void ModifyInterfaceLayers(List <MethodSequenceListItem> layers) { int MouseTextIndex = layers.FindIndex(layer => layer.Name.Equals("Vanilla: Mouse Text")); if (MouseTextIndex != -1) { layers.Insert(MouseTextIndex, new MethodSequenceListItem( "ExampleMod: Coins Per Minute", delegate { if (ExampleUI.visible) { exampleUserInterface.Update(Main._drawInterfaceGameTime); exampleUI.Draw(Main.spriteBatch); } return(true); }, null) ); } }