Skip to content

Add multi-monitor support, focus management, dark mode, and UI improvements#57

Open
neoyubi wants to merge 9 commits intomck-9061:masterfrom
neoyubi:master
Open

Add multi-monitor support, focus management, dark mode, and UI improvements#57
neoyubi wants to merge 9 commits intomck-9061:masterfrom
neoyubi:master

Conversation

@neoyubi
Copy link
Copy Markdown

@neoyubi neoyubi commented Dec 7, 2025

Hey, I have been using CATS for a while and ran into some issues with my setup that I ended up fixing. Figured I would contribute back.

The main thing is multi-monitor support. I run Elite on my secondary display and the coordinate system was always clicking on the wrong screen. I added proper monitor enumeration using the Windows display API so it can detect which monitor Elite is actually on and offset all coordinates accordingly.

While I was in there I also added:

  • Native 2560x1440 resolution mappings in res.csv
  • Window focus verification before actions (with automatic refocus if needed)
  • A focus watchdog that pauses when Elite loses focus and resumes when it comes back
  • Optional pre-jump alert overlay for AFK situations
  • Dark mode toggle (the white theme was killing my eyes)
  • Animated status indicator showing current operation state
  • Fixed some build issues with the BeforeBuild target

The changes are across both the C# and Python sides. I tried to keep the code style consistent with what was already there. Everything is opt-in where it makes sense (dark mode and pre-jump alerts are toggleable in settings).

I have been running this on my own carrier for a few hours and it has been solid. Happy to make adjustments if you have feedback on the implementation. I also setup a prerelease executable on my fork if you want to test locally first.

Let me know if you want me to split this into smaller PRs or if there is anything you would like changed.

neoyubi and others added 6 commits December 7, 2025 18:54
… alerts

  Features:
  - Dark mode toggle in Options with light/dark theme support
  - Fixed button text colors in dark mode using owner-draw rendering
  - Dynamic animated status indicator replacing static Run button during operation
  - Focus watchdog that pauses navigation when Elite Dangerous loses focus
  - Pre-jump alert system with fullscreen overlay, taskbar flash, and sound
    - Triggers 15 seconds before jump plotting
    - 5-second countdown with dismiss on click/keypress
  - New settings: dark-mode, pre-jump-alert in settings.ini

  New files:
  - AlertOverlay.cs - Fullscreen alert overlay with animation
  - Controls/StatusIndicator.cs - Animated status panel
  - FlashWindow.cs - Windows taskbar flash API
  - FocusWatchdog.cs - Elite Dangerous focus monitoring

  Build improvements:
  - Removed aggressive BeforeBuild clean target that caused file locking issues
  - Switched PostBuild from xcopy to robocopy for resilience
 Add dark mode toggle, status indicator, focus watchdog, and pre-jump…
@neoyubi
Copy link
Copy Markdown
Author

neoyubi commented Dec 7, 2025

A small preview screen

Screenshot 2025-12-07 204126

@neoyubi neoyubi marked this pull request as draft December 7, 2025 19:53
@neoyubi
Copy link
Copy Markdown
Author

neoyubi commented Dec 7, 2025

I have noticed there is still some room for improvement regarding the fullscreen notifiers timings. Will mark to "Ready for review" when fixed.

@mck-9061
Copy link
Copy Markdown
Owner

mck-9061 commented Dec 7, 2025

This is good work. I'll test it out and review the code when I can, it's a lot of changes so bear with me

@neoyubi
Copy link
Copy Markdown
Author

neoyubi commented Dec 7, 2025

No rush at all man take your time. I will do some more adjustments because I notice the resuming and stop mechanisms need some improvements for better stability. But in general I think when its a bit polished it will definitely improve QoL of CATS a lot! You can of course check it out already but for best stability I'd suggest waiting until I mark "Ready for review" when i deem it stable enough.

  - Replace countdown-based alerts with interaction signals from Python
  - C# now waits for explicit plotting/refueling signals before showing alerts
  - Python waits for 'proceed' signal via stdin before continuing automation
  - Replace blocking MessageBox for tritium alerts with non-blocking overlay
  - Fix AlertOverlay callback not firing by adding isDismissing guard
  - Fix focus monitoring continuing after refuel completion
  - Rename PreJumpAlert to PreInteractionAlert for clarity
  - Add 30-second grace period to prevent false tritium alerts on resume
@neoyubi neoyubi marked this pull request as ready for review December 7, 2025 22:20
@neoyubi
Copy link
Copy Markdown
Author

neoyubi commented Dec 7, 2025

I am done for now. This should be pretty stable. You can compile yourself or use the latest preview I built: https://github.com/neoyubi/CATS/releases/tag/v4.0.1preview

If you have any questions or need me don't hesitate to reach out. I will try and get back when I can but daily work and life might cause me to reply with a bit of a delay. I hope this entire pull helps out this project!

@neoyubi neoyubi marked this pull request as draft December 7, 2025 23:23
@neoyubi
Copy link
Copy Markdown
Author

neoyubi commented Dec 7, 2025

Ran it a bit longer for testing but it seems there is still some unreliabilities regarding the window focusing. E.g.:
Error focusing Elite window: (0, 'SetForegroundWindow', 'No error message is available')

I will have to investigate and fix this reliably so I dont waste your time reviewing something buggy. Will let you know when I have something reliable. I turned it back into draft. Sorry for going back and fourth.

…route matching

- Add multi-technique window focus (ALT key, AttachThreadInput, click fallback)
- Grant Python subprocess foreground permission via AllowSetForegroundWindow
- Only refuel when tritium below 500 (was refueling after every jump)
- Fix case-sensitive system name comparison causing false jump failures
- Update ensure_elite_focused to wait for manual focus if all techniques fail
- Bump version to 4.0.2
@neoyubi neoyubi marked this pull request as ready for review December 7, 2025 23:53
@neoyubi
Copy link
Copy Markdown
Author

neoyubi commented Dec 7, 2025

@neoyubi
Copy link
Copy Markdown
Author

neoyubi commented Dec 8, 2025

Small note before I go to sleep:
I tested it and most of the features work pretty well but the intended feature for it to pause when navigating away from elite dangerous during plotting where it was supposed to pause and would resume on return to ED window is broken: no explicit bug, it just doesnt do it. Will fix another time.

@neoyubi
Copy link
Copy Markdown
Author

neoyubi commented Dec 9, 2025

Small note before I go to sleep: I tested it and most of the features work pretty well but the intended feature for it to pause when navigating away from elite dangerous during plotting where it was supposed to pause and would resume on return to ED window is broken: no explicit bug, it just doesnt do it. Will fix another time.

Done.

@mck-9061
Copy link
Copy Markdown
Owner

Apologies for the time to review this - I will get round to it, just hectic with work and Christmas at the moment.

@neoyubi
Copy link
Copy Markdown
Author

neoyubi commented Dec 15, 2025

No need to stress it like I said. Let me know if you need anything from my end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants