private void DoLoadPreset(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))
{
SetPreset(pair.Value);
}
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();
}