public override void MouseMoving(MouseEventArgs e) { base.MouseMoving(e); int rx = e.X - this.Viewport.X; int ry = e.Y - this.Viewport.Y; if (!WidgetIM.Hovering || rx < 0 || rx > this.Size.Width) { this.Sprites["selector"].Visible = false; this.SelectedItem = null; return; } int y = 4; if (ry < y) { Sprites["selector"].Visible = false; this.SelectedItem = null; return; } IMenuItem OldSelected = SelectedItem; for (int i = 0; i < this.Items.Count; i++) { if (Items[i] is MenuItem) { if (y <= ry && y + 23 > ry) { Sprites["selector"].Y = y + 2; Sprites["selector"].Visible = true; this.SelectedItem = Items[i]; break; } y += 23; } else { if (y <= ry && y + 5 > ry) { Sprites["selector"].Visible = false; this.SelectedItem = Items[i]; break; } y += 5; } } if (OldSelected != SelectedItem) { if (HelpTextWidget != null) { HelpTextWidget.Dispose(); } HelpTextWidget = null; } }
public void HelpTextWidgetCreated(BaseEventArgs e) { HelpTextWidget.SetZIndex(this.ZIndex); }