mirror of
https://github.com/GrahamKracker/UnityExplorer.git
synced 2025-07-05 12:52:24 +08:00
Add keybinds for Mouse Inspect, small cleanup
This commit is contained in:
@ -59,7 +59,7 @@ namespace UnityExplorer.UI.Panels
|
||||
// Inspect under mouse dropdown on title bar
|
||||
|
||||
var mouseDropdown = UIFactory.CreateDropdown(closeHolder, "MouseInspectDropdown", out MouseInspectDropdown, "Mouse Inspect", 14,
|
||||
InspectUnderMouse.OnDropdownSelect);
|
||||
MouseInspector.OnDropdownSelect);
|
||||
UIFactory.SetLayoutElement(mouseDropdown, minHeight: 25, minWidth: 140);
|
||||
MouseInspectDropdown.options.Add(new Dropdown.OptionData("Mouse Inspect"));
|
||||
MouseInspectDropdown.options.Add(new Dropdown.OptionData("World"));
|
||||
|
@ -73,7 +73,7 @@ namespace UnityExplorer.UI
|
||||
return;
|
||||
|
||||
UniversalUI.SetUIActive(ExplorerCore.GUID, value);
|
||||
UniversalUI.SetUIActive(InspectUnderMouse.UIBaseGUID, value);
|
||||
UniversalUI.SetUIActive(MouseInspector.UIBaseGUID, value);
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,7 +106,7 @@ namespace UnityExplorer.UI
|
||||
UIPanels.Add(Panels.ConsoleLog, new LogPanel());
|
||||
UIPanels.Add(Panels.Options, new OptionsPanel());
|
||||
UIPanels.Add(Panels.UIInspectorResults, new UiInspectorResultsPanel());
|
||||
UIPanels.Add(Panels.MouseInspector, new InspectUnderMouse());
|
||||
UIPanels.Add(Panels.MouseInspector, new MouseInspector());
|
||||
|
||||
foreach (var panel in UIPanels.Values)
|
||||
panel.ConstructUI();
|
||||
@ -135,12 +135,9 @@ namespace UnityExplorer.UI
|
||||
if (!UIRoot)
|
||||
return;
|
||||
|
||||
// if doing Mouse Inspect, update that and return.
|
||||
if (InspectUnderMouse.Inspecting)
|
||||
{
|
||||
InspectUnderMouse.Instance.UpdateInspect();
|
||||
// If we are doing a Mouse Inspect, we don't need to update anything else.
|
||||
if (MouseInspector.Instance.TryUpdate())
|
||||
return;
|
||||
}
|
||||
|
||||
// Update Notification modal
|
||||
Notification.Update();
|
||||
|
Reference in New Issue
Block a user