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))); }
public void SetUp() => Schedule(() => { Child = new SkinProvidingContainer(skin) { RelativeSizeAxes = Axes.Both, Child = toolTip = new LayoutToolTip { Anchor = Anchor.Centre, Origin = Anchor.Centre } }; toolTip.Show(); });
// Use this for initialization public void Awake() { instance = this; if (!canvas) { canvas = GetComponentInParent <Canvas>(); canvas = canvas.rootCanvas; } _guiCamera = canvas.worldCamera; guiMode = canvas.renderMode; _rectTransform = GetComponent <RectTransform>(); SetNewDefaultPivot(_rectTransform.pivot); canvasRectTransform = canvas.GetComponent <RectTransform>(); _layoutGroup = GetComponentInChildren <LayoutGroup>(); _inside = false; this.gameObject.SetActive(false); }
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)); } } }