protected override bool DrawSelf() { if (UIState.Visible) { UserInterface.Update(Main._drawInterfaceGameTime); UIState.Draw(Main.spriteBatch); } return(true); }
private void AddLayer(List <GameInterfaceLayer> layers, UserInterface userInterface, UIState state, int index, bool visible) { string name = state == null ? "Unknown" : state.ToString(); layers.Insert(index, new LegacyGameInterfaceLayer("StarlightRiver: " + name, delegate { if (visible) { userInterface.Update(Main._drawInterfaceGameTime); state.Draw(Main.spriteBatch); } return(true); }, InterfaceScaleType.UI)); }