mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2026-05-15 05:24:46 +08:00
Multi-selection, move, undo/redo
This commit is contained in:
+10
-4
@@ -22,6 +22,7 @@ namespace CodeWalker
|
||||
{
|
||||
WorldForm WorldForm;
|
||||
MapSelection Selection;
|
||||
List<MapSelection> SelectionItems;
|
||||
string SelectionMode = "";
|
||||
bool MouseSelectEnable = false;
|
||||
|
||||
@@ -59,9 +60,10 @@ namespace CodeWalker
|
||||
MouseSelectCheckBox.Checked = enable;
|
||||
}
|
||||
|
||||
public void SetSelection(MapSelection item)
|
||||
public void SetSelection(MapSelection item, List<MapSelection> multiItems)
|
||||
{
|
||||
Selection = item;
|
||||
SelectionItems = multiItems;
|
||||
|
||||
SelectionNameTextBox.Text = item.GetNameString("Nothing selected");
|
||||
//SelEntityPropertyGrid.SelectedObject = item.EntityDef;
|
||||
@@ -87,8 +89,12 @@ namespace CodeWalker
|
||||
AddSelectionEntityHierarchyNodes(item.EntityDef);
|
||||
}
|
||||
|
||||
|
||||
if (item.TimeCycleModifier != null)
|
||||
if (item.MultipleSelection)
|
||||
{
|
||||
SelectionEntityTabPage.Text = "Multiple items";
|
||||
SelEntityPropertyGrid.SelectedObject = multiItems.ToArray();
|
||||
}
|
||||
else if (item.TimeCycleModifier != null)
|
||||
{
|
||||
SelectionEntityTabPage.Text = "Time Cycle Modifier";
|
||||
SelEntityPropertyGrid.SelectedObject = item.TimeCycleModifier;
|
||||
@@ -414,7 +420,7 @@ namespace CodeWalker
|
||||
|
||||
private void WorldInfoForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
SetSelection(Selection);
|
||||
SetSelection(Selection, SelectionItems);
|
||||
}
|
||||
|
||||
private void WorldInfoForm_FormClosed(object sender, FormClosedEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user