protected override void CompileLayout(SuperGumpLayout layout) { base.CompileLayout(layout); if (IsDisposed) { return; } layout.Add("bg", () => AddBackground(0, 0, 655, 470, 2620)); layout.Add("bg/alpha", () => AddAlphaRegion(10, 10, 635, 450)); layout.Add("chest/bg", () => AddImage(8, 7, 1415, 0)); layout.Add("chest/lid", () => AddImage(8, 9, _Frames[_Frame], 0)); if (_State != null) { return; } layout.Add( "frame/close", () => AddButton( 628, 0, 2640, 2641, b => { _ForcedClose = true; Close(b); })); if (Toolbar.Count > 0) { layout.Add("toolbar/bg", () => AddBackground(105, 70, 440, 40, 2620)); layout.Add("toolbar/alpha", () => AddAlphaRegion(110, 75, 430, 30)); Toolbar.ForRange( 0, 13, (i, k, v) => { int xo = i * 34; //(i % 2 == 0 ? 34 : 33); layout.Add( "toolbar/button/" + k, () => { AddButton(110 + xo, 80, v.Icon.Normal, v.Icon.Pressed, b => v.Callback()); AddTooltip(v.Icon.Tooltip); }); }); } //layout.Add("page/bg", () => AddBackground(105, 115, 440, 260, 2620)); //layout.Add("page/alpha", () => AddAlphaRegion(110, 120, 430, 250)); Page.CompileLayout(this, layout); }