mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-12-17 23:51:10 +00:00
ab7d4b2054
Added icons for "Save Screenshot" menu items. Development: "Save Screenshot (active window)" action will work on a child Form only if it is inherited from DelayedForm.
34 lines
1.1 KiB
C#
34 lines
1.1 KiB
C#
using System;
|
|
using System.Windows.Forms;
|
|
using CodeImp.DoomBuilder.Geometry;
|
|
|
|
namespace CodeImp.DoomBuilder.Windows
|
|
{
|
|
public partial class CenterOnCoordinatesForm : DelayedForm
|
|
{
|
|
private static Vector2D coordinates;
|
|
public Vector2D Coordinates { get { return coordinates; } }
|
|
|
|
public CenterOnCoordinatesForm()
|
|
{
|
|
InitializeComponent();
|
|
gotox.Text = coordinates.x.ToString();
|
|
gotoy.Text = coordinates.y.ToString();
|
|
}
|
|
|
|
private void accept_Click(object sender, EventArgs e)
|
|
{
|
|
coordinates.x = (float)Math.Round(General.Clamp(gotox.GetResult((int)coordinates.x), General.Map.FormatInterface.MinCoordinate, General.Map.FormatInterface.MaxCoordinate));
|
|
coordinates.y = (float)Math.Round(General.Clamp(gotoy.GetResult((int)coordinates.y), General.Map.FormatInterface.MinCoordinate, General.Map.FormatInterface.MaxCoordinate));
|
|
|
|
this.DialogResult = DialogResult.OK;
|
|
this.Close();
|
|
}
|
|
|
|
private void cancel_Click(object sender, EventArgs e)
|
|
{
|
|
this.DialogResult = DialogResult.Cancel;
|
|
this.Close();
|
|
}
|
|
}
|
|
}
|