コード例 #1
0
ファイル: UI.cs プロジェクト: Fymir27/RoguelikeECS
        public UIWindow(string name, Rectangle bounds, bool displayName = true, string backgroundTexture = "UIBox") : this(name, displayName)
        {
            if (UI.Graphics == null)
            {
                throw new Exception("UI.Graphics not initialized before creating UIWindow!");
            }

            Background = new NineSlicedSprite(backgroundTexture, bounds, UI.Graphics);
        }
コード例 #2
0
ファイル: UI.cs プロジェクト: Fymir27/RoguelikeECS
        public UIWindow(string name, bool displayName, int padding = 10)
        {
            Name        = name;
            DisplayName = displayName;
            Padding     = padding;

            Content     = new List <string>();
            Background  = null;
            NameFont    = Util.BigFont;
            ContentFont = Util.DefaultFont;
        }