CM3D2.SubScreen.Plugin.SubScreen.DoRemovePreset C# (CSharp) Method

DoRemovePreset() private method

private DoRemovePreset ( int winId ) : void
winId int
return void
        private void DoRemovePreset(int winId)
        {
            Rect baseRect = pv.InsideRect(this.winRect);
            Rect headerRect = new Rect(baseRect.x, baseRect.y, baseRect.width, pv.Line("H3"));
            Rect scrollRect = new Rect(baseRect.x, baseRect.y + headerRect.height + pv.Margin
                                      , baseRect.width + pv.PropPx(5), baseRect.height - headerRect.height - pv.Margin);
            Rect conRect = new Rect(0, 0, scrollRect.width - pv.Sys_("HScrollBar.Width") - pv.Margin, 0);
            Rect outRect = new Rect();
            outRect.width = conRect.width;
            outRect.height = pv.Line("H1");
            GUIStyle lStyle = "label";
            GUIStyle bStyle = "button";
            Color color = new Color(1f, 1f, 1f, 0.98f);
            lStyle.normal.textColor = color;
            lStyle.fontSize = pv.Font("H3");
            bStyle.normal.textColor = color;
            bStyle.fontSize = pv.Font("H1");

            drawWinHeader(headerRect, "プリセットを削除", lStyle);

            conRect.height += (outRect.height + pv.Margin) * (presets.Count() + 1);
            // スクロールビュー
            scrollViewVector = GUI.BeginScrollView(scrollRect, scrollViewVector, conRect);
            foreach (KeyValuePair<string, SSPreset> pair in presets)
            {
                if (GUI.Button(outRect, pair.Key, bStyle))
                {
                    RemovePreset(pair.Key);
                }
                outRect.y += outRect.height + pv.Margin;
            }
            GUI.EndScrollView();
            outRect.x = pv.Margin;
            outRect.y = winRect.height - outRect.height - pv.Margin;
            if (GUI.Button(outRect, "閉じる", bStyle))
            {
                menuType = MenuType.Main;
            }
            GUI.DragWindow();
        }