private void BlsFrom_MouseMove(object sender, MouseEventArgs e) { int x = e.X / 16; int y = e.Y / 16; if (PreviousFromX == x && PreviousFromY == y) { return; } PreviousFromX = x; PreviousFromY = y; LayoutToolTip.SetToolTip(BlsFrom, ProjectController.BlockManager.GetBlockString(CmbDefinitions.SelectedIndex + 1, ((y * 16) + x))); }
private void BlsTo_MouseMove(object sender, MouseEventArgs e) { int x = e.X / 16; int y = e.Y / 16; if (PreviousToX == PreviousToY) { return; } PreviousToX = x; PreviousToY = y; int index = ((y * 16) + x); if (BlsTo.BlockLayout != null) { int tile = BlsTo.BlockLayout.Layout[index]; if (tile != -1) { LayoutToolTip.SetToolTip(BlsTo, ProjectController.BlockManager.GetBlockString(CmbDefinitions.SelectedIndex + 1, tile)); } } }