mirror of
https://github.com/kwsch/pkNX.git
synced 2026-10-02 06:06:38 -05:00
Show coordinates on hover
This commit is contained in:
@@ -220,14 +220,14 @@ public static IEnumerable<string> GetUnownLinesBias(AreaInstance8a area, IReadOn
|
||||
var contained = s.GetContainingLocations(area.Locations).First().PlaceName;
|
||||
var name = valueTuples[contained].Name;
|
||||
var p = s.Parameters;
|
||||
yield return $"Spawner @ {s.NameSummary}_{s.Field_01:X16} ({p.GetConditionSummary()}) @ {p.Coordinates.ToTriple()}, {area.AreaName} = {name}";
|
||||
yield return $"Spawner @ {s.NameSummary}_{s.Field_01:X16} ({p.GetConditionSummary()}) @ {p.Coordinates.ToTriple()} ({s.MinSpawnCount}-{s.MaxSpawnCount}), {area.AreaName} = {name}";
|
||||
}
|
||||
foreach (var s in usedByNHO)
|
||||
{
|
||||
var contained = s.GetContainingLocations(area.Locations).First().PlaceName;
|
||||
var name = valueTuples[contained].Name;
|
||||
var p = s.Parameters;
|
||||
yield return $"SpawnerNHO @ {s.NameSummary}_{s.Field_01:X16} ({p.GetConditionSummary()}) @ {p.Coordinates.ToTriple()}, {area.AreaName} = {name}";
|
||||
yield return $"SpawnerNHO @ {s.NameSummary}_{s.Field_01:X16} ({p.GetConditionSummary()}) @ {p.Coordinates.ToTriple()} ({s.MinSpawnCount}-{s.MaxSpawnCount}), {area.AreaName} = {name}";
|
||||
}
|
||||
foreach (var s in usedByWormholes)
|
||||
{
|
||||
@@ -235,7 +235,7 @@ public static IEnumerable<string> GetUnownLinesBias(AreaInstance8a area, IReadOn
|
||||
var name = valueTuples[contained].Name;
|
||||
var p = s.Parameters;
|
||||
var c = s.Field_20_Value;
|
||||
yield return $"Wormhole: {s.NameSummary}_{s.Field_01:X16} ({p.GetConditionSummary()}) [{c.BonusLevelMin}-{c.BonusLevelMax}] @ {p.Coordinates.ToTriple()}, {area.AreaName} = {name}";
|
||||
yield return $"Wormhole: {s.NameSummary}_{s.Field_01:X16} ({p.GetConditionSummary()}) [{c.BonusLevelMin}-{c.BonusLevelMax}] @ {p.Coordinates.ToTriple()} ({s.MinSpawnCount}-{s.MaxSpawnCount}), {area.AreaName} = {name}";
|
||||
}
|
||||
foreach (var s in usedByLandmarks)
|
||||
{
|
||||
|
||||
14
pkNX.WinForms/Subforms/MapViewer8a.Designer.cs
generated
14
pkNX.WinForms/Subforms/MapViewer8a.Designer.cs
generated
@@ -31,6 +31,7 @@ private void InitializeComponent()
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.CB_Map = new System.Windows.Forms.ComboBox();
|
||||
this.CB_Species = new System.Windows.Forms.ComboBox();
|
||||
this.L_CoordinateMouse = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@@ -64,18 +65,30 @@ private void InitializeComponent()
|
||||
this.CB_Species.TabIndex = 2;
|
||||
this.CB_Species.SelectedIndexChanged += new System.EventHandler(this.CB_Species_SelectedIndexChanged);
|
||||
//
|
||||
// L_CoordinateMouse
|
||||
//
|
||||
this.L_CoordinateMouse.AutoSize = true;
|
||||
this.L_CoordinateMouse.Location = new System.Drawing.Point(527, 510);
|
||||
this.L_CoordinateMouse.Name = "L_CoordinateMouse";
|
||||
this.L_CoordinateMouse.Size = new System.Drawing.Size(153, 13);
|
||||
this.L_CoordinateMouse.TabIndex = 3;
|
||||
this.L_CoordinateMouse.Text = "Hover over img for Coordinates";
|
||||
//
|
||||
// MapViewer8a
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(709, 532);
|
||||
this.Controls.Add(this.L_CoordinateMouse);
|
||||
this.Controls.Add(this.CB_Species);
|
||||
this.Controls.Add(this.CB_Map);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Name = "MapViewer8a";
|
||||
this.Text = "MapViewer8a";
|
||||
this.pictureBox1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.MapViewer8a_MouseMove);
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
@@ -84,5 +97,6 @@ private void InitializeComponent()
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.ComboBox CB_Map;
|
||||
private System.Windows.Forms.ComboBox CB_Species;
|
||||
private System.Windows.Forms.Label L_CoordinateMouse;
|
||||
}
|
||||
}
|
||||
@@ -193,6 +193,12 @@ private static List<AreaDef> GetSpawnerInfo(int species, AreaInstance8a area)
|
||||
}
|
||||
|
||||
private static readonly EncounterSlot8a[] Unown = { new() { Species = 201 } };
|
||||
|
||||
private void MapViewer8a_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
var (x, y) = (e.X, e.Y);
|
||||
L_CoordinateMouse.Text = $"{x * 2}, {y * 2}";
|
||||
}
|
||||
}
|
||||
|
||||
public class AreaDef
|
||||
|
||||
Reference in New Issue
Block a user