This repository has been archived by the owner on Jul 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMapCharStartToolForm.cs
95 lines (77 loc) · 2.56 KB
/
MapCharStartToolForm.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace LEdit
{
public partial class MapCharStartToolForm : Form
{
MapEditForm parent;
L2MapHeader.CharacterStart edit;
public L2MapHeader.CharacterStart CharacterStart { get { return edit; } }
public MapCharStartToolForm(MapEditForm parent_window, L2MapHeader.CharacterStart edit_arg)
{
InitializeComponent();
parent = parent_window;
edit = edit_arg;
numDestX.Value = edit.x1;
numDestY.Value = edit.y1;
numX1.Value = edit.move_area_x1;
numY1.Value = edit.move_area_y1;
numX2.Value = edit.move_area_x2;
numY2.Value = edit.move_area_y2;
numericUpDown9.Value = edit.unknown;
this.Text = "Charakter-Bereich 0x" + edit.id.ToString("X2");
}
private void Apply()
{
edit.x1 = (byte)numDestX.Value;
edit.y1 = (byte)numDestY.Value;
edit.move_area_x1 = (byte)numX1.Value;
edit.move_area_y1 = (byte)numY1.Value;
edit.move_area_x2 = (byte)numX2.Value;
edit.move_area_y2 = (byte)numY2.Value;
edit.unknown = (byte)numericUpDown9.Value;
parent.RefreshView();
}
private void button1_Click(object sender, EventArgs e)
{
Apply();
}
private void MapCharStartToolForm_FormClosed(object sender, FormClosedEventArgs e)
{
parent.CharStartEditClosed(this);
}
private void toolStripButton1_Click(object sender, EventArgs e)
{
int x1, y1, x2, y2;
parent.GetSelection(out x1, out y1, out x2, out y2);
numX1.Value = x1;
numY1.Value = y1;
numX2.Value = x2;
numY2.Value = y2;
}
private void toolStripButton2_Click(object sender, EventArgs e)
{
numX1.Value = 255;
numY1.Value = 255;
numX2.Value = 255;
numY2.Value = 255;
}
private void toolStripButton3_Click(object sender, EventArgs e)
{
int x, y;
parent.GetSelection(out x, out y);
numDestX.Value = x;
numDestY.Value = y;
}
private void toolStripButton4_Click(object sender, EventArgs e)
{
numDestX.Value = 255;
numDestY.Value = 255;
}
}
}