コード例 #1
0
ファイル: WndTabbed.cs プロジェクト: zvinch/SharpDungeon
        public override void Resize(int w, int h)
        {
            Width  = w;
            Height = h;

            Chrome.Size(Width + Chrome.MarginHor(), Height + Chrome.MarginVer());

            Camera.Resize((int)Chrome.Width, Chrome.MarginTop() + Height + TabHeight());
            Camera.X = (int)(Game.Width - Camera.ScreenWidth) / 2;
            Camera.Y = (int)(Game.Height - Camera.ScreenHeight) / 2;

            foreach (var tab in Tabs)
            {
                Remove(tab);
            }

            var tabList = new List <Tab>(Tabs);

            Tabs.Clear();

            foreach (var tab in tabList)
            {
                Add(tab);
            }
        }