Exemplo n.º 1
0
        protected override bool DrawSelf()
        {
            if (UIState.Visible)
            {
                UserInterface.Update(Main._drawInterfaceGameTime);
                UIState.Draw(Main.spriteBatch);
            }

            return(true);
        }
Exemplo n.º 2
0
        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));
        }