private void setGPSToolStripMenuItem_Click(object sender, EventArgs e) { Button b = (Button)contextMenuStrip1.SourceControl; if (b != null) { MBookmark bm = (MBookmark)b.Tag; if (bm != null) { MMessageBus.Navigate(this, MassiveTools.VectorFromArray(bm.Position)); } } }
private void contextMenuStrip1_Opened(object sender, EventArgs e) { Button b = (Button)contextMenuStrip1.SourceControl; if (b != null) { MBookmark bm = (MBookmark)b.Tag; if (bm != null) { RenameTextBox.Text = bm.Name; } } }
private void But_Click(object sender, EventArgs e) { Button b = (Button)sender; MBookmark bm = (MBookmark)b.Tag; if (bm != null) { if (Globals.Network.Connected == true) { MMessageBus.TeleportRequest(this, MassiveTools.VectorFromArray(bm.Position), MassiveTools.QuaternionFromArray(bm.Rotation)); } else { MScene.Camera.transform.Position = MassiveTools.VectorFromArray(bm.Position); Globals.UserAccount.CurrentPosition = bm.Position; Globals.Avatar.SetPosition(MScene.Camera.transform.Position); MMessageBus.AvatarMoved(this, Globals.UserAccount.UserID, MScene.Camera.transform.Position, MassiveTools.QuaternionFromArray(bm.Rotation)); } } }