mirror of
https://github.com/kwsch/pkNX.git
synced 2026-08-25 11:54:26 -05:00
Show coordinates on mouse move
This commit is contained in:
1
pkNX.WinForms/Subforms/MapViewer9.Designer.cs
generated
1
pkNX.WinForms/Subforms/MapViewer9.Designer.cs
generated
@@ -42,6 +42,7 @@ private void InitializeComponent()
|
||||
this.pictureBox1.Size = new System.Drawing.Size(597, 591);
|
||||
this.pictureBox1.TabIndex = 0;
|
||||
this.pictureBox1.TabStop = false;
|
||||
this.pictureBox1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pictureBox1_MouseMove);
|
||||
//
|
||||
// CB_Map
|
||||
//
|
||||
|
||||
@@ -189,6 +189,12 @@ private void UpdateMap(int map)
|
||||
}
|
||||
}
|
||||
|
||||
private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
var x = ((e.X * 5000.0f) / pictureBox1.Width);
|
||||
var z = ((e.Y * 5000.0f) / pictureBox1.Height) - 5500f;
|
||||
Text = $"X: {x}, Z: {z}";
|
||||
}
|
||||
}
|
||||
public class AreaDef9
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user