Ram Watch - Set New Watch prompt location to open over the listview item of the dialog
This commit is contained in:
parent
55e60f438e
commit
6384ca52d6
|
@ -211,11 +211,16 @@ namespace BizHawk.MultiClient
|
|||
|
||||
void AddNewWatch()
|
||||
{
|
||||
Point p = new Point(WatchListView.Location.X, WatchListView.Location.Y);
|
||||
Point q = new Point();
|
||||
q = PointToScreen(p);
|
||||
|
||||
RamWatchNewWatch r = new RamWatchNewWatch();
|
||||
r.location = q;
|
||||
|
||||
r.ShowDialog();
|
||||
if (r.userSelected == true)
|
||||
{
|
||||
//TODO: check for duplicates before adding? All parameters would have to match, otherwise it should be allowed
|
||||
watchList.Add(r.watch);
|
||||
DisplayWatchList();
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ namespace BizHawk.MultiClient
|
|||
public Watch watch = new Watch();
|
||||
public bool userSelected = false;
|
||||
public bool customSetup = false;
|
||||
public Point location = new Point();
|
||||
|
||||
public RamWatchNewWatch()
|
||||
{
|
||||
|
@ -88,6 +89,8 @@ namespace BizHawk.MultiClient
|
|||
else
|
||||
LittleEndianRadio.Checked = true;
|
||||
}
|
||||
if (location.X > 0 && location.Y > 0)
|
||||
this.Location = location;
|
||||
}
|
||||
|
||||
private void Cancel_Click(object sender, EventArgs e)
|
||||
|
|
Loading…
Reference in New Issue