public override void Update(double totalMS, double frameMS) { if (_expandableScrollHeight < c_ExpandableScrollHeight_Min) { _expandableScrollHeight = c_ExpandableScrollHeight_Min; } if (_expandableScrollHeight > c_ExpandableScrollHeight_Max) { _expandableScrollHeight = c_ExpandableScrollHeight_Max; } if (_gumplingTitleGumpIDDelta) { _gumplingTitleGumpIDDelta = false; if (_gumplingTitle != null) { _gumplingTitle.Dispose(); } AddChildren(_gumplingTitle = new GumpPic(0, 0, (Graphic)_gumplingTitleGumpID, 0)); } if (!_gumpTop.IsInitialized) { IsVisible = false; } else { IsVisible = true; //TOP _gumpTop.X = 0; _gumpTop.Y = 0; //MIDDLE _gumpMiddle.X = 17; _gumpMiddle.Y = _gumplingMidY; _gumpMiddle.Width = 263; _gumpMiddle.Height = _gumplingMidHeight; //BOTTOM _gumpBottom.X = 17; _gumpBottom.Y = _gumplingBottomY; if (_isResizable) { _gumpExpander.X = _gumplingExpanderX; _gumpExpander.Y = _gumplingExpanderY; } if (_gumplingTitle != null && _gumplingTitle.IsInitialized) { _gumplingTitle.X = (_gumpTop.Width - _gumplingTitle.Width) / 2; _gumplingTitle.Y = (_gumpTop.Height - _gumplingTitle.Height) / 2; } } base.Update(totalMS, frameMS); }
protected override void OnInitialize() { AddChildren(_gumpTop = new GumpPic(0, 0, 0x0820, 0)); AddChildren(_gumpMiddle = new GumpPicTiled(0, 0, 0, 0, 0x0822)); AddChildren(_gumpBottom = new GumpPic(0, 0, 0x0823, 0)); if (_isResizable) { AddChildren(_gumpExpander = new Button(c_GumplingExpander_ButtonID, 0x082E, 0x82F) { ButtonAction = ButtonAction.Activate, X = 0, Y = 0 }); _gumpExpander.MouseDown += expander_OnMouseDown; _gumpExpander.MouseUp += expander_OnMouseUp; _gumpExpander.MouseEnter += expander_OnMouseOver; } }