Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
amylizzle committed Jan 29, 2025
1 parent dd7d0ec commit 345a777
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions OpenDreamClient/Interface/DreamInterfaceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ internal sealed class DreamInterfaceManager : IDreamInterfaceManager {
public Dictionary<string, ControlWindow> Windows { get; } = new();
public Dictionary<string, InterfaceMenu> Menus { get; } = new();
public Dictionary<string, InterfaceMacroSet> MacroSets { get; } = new();
private Dictionary<WindowId, ControlWindow> ClydeWindowIDToControl { get; } = new();
private Dictionary<WindowId, ControlWindow> ClydeWindowIdToControl { get; } = new();

public ViewRange View {
get => _view;
Expand Down Expand Up @@ -919,13 +919,12 @@ private void LoadInterface(InterfaceDescriptor descriptor) {
_uiManager.StateRoot.AddChild(DefaultWindow.UIElement);

if (DefaultWindow.GetClydeWindow() is { } clydeWindow) {
ClydeWindowIDToControl.Add(clydeWindow.Id, DefaultWindow);
ClydeWindowIdToControl.Add(clydeWindow.Id, DefaultWindow);
}

}

private void OnWindowFocused(WindowFocusedEventArgs args) {
if(ClydeWindowIDToControl.TryGetValue(args.Window.Id, out var controlWindow)){
if(ClydeWindowIdToControl.TryGetValue(args.Window.Id, out var controlWindow)){
_sawmill.Debug($"window id {controlWindow.Id} was {(args.Focused ? "focused" : "defocused")}");
WindowDescriptor descriptor = (WindowDescriptor) controlWindow.ElementDescriptor;
descriptor.Focus = new DMFPropertyBool(args.Focused);
Expand Down Expand Up @@ -959,7 +958,7 @@ private void LoadDescriptor(ElementDescriptor descriptor) {
}

if (window.GetClydeWindow() is { } clydeWindow) {
ClydeWindowIDToControl.Add(clydeWindow.Id, window);
ClydeWindowIdToControl.Add(clydeWindow.Id, window);
}

break;
Expand Down

0 comments on commit 345a777

Please sign in to comment.