void _editObjectButton_Click(object sender, EventArgs e) { Windows.EditHotspotPopup popup = new Windows.EditHotspotPopup((Hotspot)hotspotsListbox.SelectedItem); popup.Closed += (o, e2) => { if (popup.DialogResult) { var hotSpot = (Hotspot)hotspotsListbox.SelectedItem; hotSpot.Title = popup.CreatedHotspot.Title; popup.CreatedHotspot.DebugAppearance.CopyAppearanceTo(hotSpot.DebugAppearance); hotSpot.Settings = popup.CreatedHotspot.Settings; hotspotsListbox.GetContainer(hotspotsListbox.SelectedItem).IsDirty = true; //MainScreen.Instance.ToolPane.SelectedTool.RefreshTool(); } }; popup.Show(true); }
void _createNewObjectButton_Click(object sender, EventArgs e) { Hotspot hotSpot = new Hotspot(); Windows.EditHotspotPopup popup = new Windows.EditHotspotPopup(hotSpot); popup.Closed += (o, e2) => { if (popup.DialogResult) { hotSpot = popup.CreatedHotspot; hotspotsListbox.Items.Add(hotSpot); hotspotsListbox.SelectedItem = hotSpot; exportListButton.IsEnabled = true; ((Editors.SceneEditor)MainScreen.Instance.ActiveEditor).Hotspots.Add(hotSpot); } }; popup.Show(true); }
void _editObjectButton_ButtonClicked(object sender, EventArgs e) { Windows.EditHotspotPopup popup = new Windows.EditHotspotPopup((Hotspot)hotspotsListbox.SelectedItem); popup.Closed += (o, e2) => { if (popup.DialogResult) { var hotSpot = (Hotspot)hotspotsListbox.SelectedItem; hotSpot.Title = popup.CreatedHotspot.Title; popup.CreatedHotspot.DebugAppearance.CopyAppearanceTo(hotSpot.DebugAppearance); hotSpot.Settings = popup.CreatedHotspot.Settings; hotspotsListbox.GetContainer(hotspotsListbox.SelectedItem).IsDirty = true; //EditorConsoleManager.ToolPane.SelectedTool.RefreshTool(); } }; popup.Show(true); }
void _createNewObjectButton_ButtonClicked(object sender, EventArgs e) { Hotspot hotSpot = new Hotspot(); Windows.EditHotspotPopup popup = new Windows.EditHotspotPopup(hotSpot); popup.Closed += (o, e2) => { if (popup.DialogResult) { hotSpot = popup.CreatedHotspot; hotspotsListbox.Items.Add(hotSpot); hotspotsListbox.SelectedItem = hotSpot; exportListButton.IsEnabled = true; ((Editors.SceneEditor)EditorConsoleManager.ActiveEditor).Hotspots.Add(hotSpot); } }; popup.Show(true); }