Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The hotkey setting "showBodyInfo" in the settings is not working. #189

Open
ckx000 opened this issue Feb 16, 2025 · 7 comments
Open

The hotkey setting "showBodyInfo" in the settings is not working. #189

ckx000 opened this issue Feb 16, 2025 · 7 comments
Assignees
Labels
ready The fix or solution is ready to be verified

Comments

@ckx000
Copy link
Contributor

ckx000 commented Feb 16, 2025

When using the preset hotkey in the game, the corresponding overlay did not appear.
Checking the log, the following was recorded:

14:05:04: Chord:ALT B => showBodyInfo
14:05:07: Chord:ALT B => showBodyInfo
14:05:09: Chord:ALT B => showBodyInfo
14:05:09: Chord:ALT B => showBodyInfo
14:05:09: Chord:ALT B => showBodyInfo
14:05:10: Chord:ALT B => showBodyInfo

The "showSystemNotes" function actually has the same log prompt, but it works normally.
Maybe it's because it pops up a Win window?

And the logs for other normally functioning hotkeys are as follows:

14:07:13: Chord:ALT D => showJumpInfo
14:07:13: Program.Creating plotter: PlotJumpInfo
14:07:13: Program.Showing plotter: PlotJumpInfo
14:07:13: !!!! OnActivated: PlotJumpInfo. Mouse is:{X=801,Y=740}
14:07:23: Chord:ALT D => showJumpInfo
14:07:23: Program.Closing plotter: PlotJumpInfo
14:07:23: Program.Closing plotter: PlotJumpInfo
@njthomson
Copy link
Owner

Thank you @ckx000 - do you recall where your ship was at this time?

The Body Info overlay would need to know which body and if you were in deep space it would not show.

@njthomson njthomson self-assigned this Feb 16, 2025
@ckx000
Copy link
Contributor Author

ckx000 commented Feb 16, 2025

Thank you @ckx000 - do you recall where your ship was at this time?

The Body Info overlay would need to know which body and if you were in deep space it would not show.

I tried it in "SuperCruising" state, and also pressed the button while orbiting a planet, but no BodyInfo appeared. The FSSinfo, however, works without any issues.
Also tried targeting a celestial body while in SuperCruising state, pressed the hotkey, and it still didn't appear.

I also observed that BodyInfo appears during DSS. (The status displayed on the program's main window is "ASS", is that a typo?)
At the same time, BodyInfo also appears in the system map. When a celestial body is targeted in the system map, it shows up. Moreover, it cannot be turned off (even if you deselect that celestial body as the target).

@njthomson
Copy link
Owner

I poked around, a fix will be ready in the next build.

@njthomson njthomson added the ready The fix or solution is ready to be verified label Feb 18, 2025
@njthomson
Copy link
Owner

The fix is checked in, but I don't recall if that was before I published the last build. If you are running from source code and pull latest, if will be fixed now.

@ckx000
Copy link
Contributor Author

ckx000 commented Feb 19, 2025

The fix is checked in, but I don't recall if that was before I published the last build. If you are running from source code and pull latest, if will be fixed now.

in 2.0.2.149 It's mostly working fine now.

But as I mentioned in another issue...
The hotkey's priority is not the highest, so it cannot disable the display of options like "in the system map" in the settings.

What I meant earlier is that options like "in the system map" in the settings should be "permanent," meaning that in most cases, they need to consistently determine whether to display or not under the correct mechanism. On the other hand, the hotkey mechanism should be "temporary," used only occasionally when the user wants to temporarily hide it.

Let's imagine a scenario: the user wants to keep "in the system map" always open to view the bodyinfo of each target within the "system map." However, when they want to check the various information on the right side of the "system map," it gets covered by the bodyinfo...
At this point, they have two options:

  1. Switch to the survey main window and check "temporarily hide all overlays." However, this will also hide other overlays.
  2. Switch to the survey main window, open the settings window, and turn off "in the system map," no longer using automatic display but instead manually using the hotkey to show the bodyinfo.

Most users exhibit a phenomenon: compared to the decision to turn off a certain overlay, the decision to turn on a certain overlay is harder to make. Especially when the hotkey to open that overlay is not always effective (because it only shows up under specific conditions).After this, users are likely to give up using this feature.

In summary, my suggestion is that the hotkey's priority doesn't necessarily have to be the highest, but it should be able to change the settings in those configuration items. Conversely, the functionality of those settings should also be able to affect the hotkey's toggle. This is what I mean by "permanent" and "temporary."

Finally, submitting a crashlog. This log was generated when I tried to use the hotkey while BodyInfo couldn't be displayed.

System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'PlotBodyInfo'.
   at System.Windows.Forms.Control.CreateHandle()
   at System.Windows.Forms.Form.CreateHandle()
   at System.Windows.Forms.Control.get_Handle()
   at System.Windows.Forms.ContainerControl.FocusActiveControlInternal()
   at System.Windows.Forms.Form.SetVisibleCore(Boolean value)
   at SrvSurvey.plotters.PlotBodyInfo.SrvSurvey.PlotterForm.Show()
   at SrvSurvey.Program.showPlotter[T](Nullable`1 gameRect) in D:\a\SrvSurvey\SrvSurvey\SrvSurvey\Program.cs:line 213
   at SrvSurvey.KeyChords.toggleBodyInfo() in D:\a\SrvSurvey\SrvSurvey\SrvSurvey\KeyChords.cs:line 255
   at SrvSurvey.KeyChords.doKeyAction(KeyAction keyAction) in D:\a\SrvSurvey\SrvSurvey\SrvSurvey\KeyChords.cs:line 111
   at SrvSurvey.KeyChords.<>c__DisplayClass4_0.<processHook>b__1() in D:\a\SrvSurvey\SrvSurvey\SrvSurvey\KeyChords.cs:line 53
   at SrvSurvey.Program.crashGuard(Boolean beginInvoke, Action func) in D:\a\SrvSurvey\SrvSurvey\SrvSurvey\Program.cs:line 140

@njthomson
Copy link
Owner

Currently the hot key toggle means: force on, or stop forcing on.

This will become (at the of pressing):

  • if currently hidden => force show
  • if visible and forced on => unforce (hide)
  • if visible naturally => force hide this instance
  • if naturally visible but force hidden => unforce instance (show)

@ckx000
Copy link
Contributor Author

ckx000 commented Feb 20, 2025

Currently the hot key toggle means: force on, or stop forcing on.

This will become (at the of pressing):

  • if currently hidden => force show
  • if visible and forced on => unforce (hide)
  • if visible naturally => force hide this instance
  • if naturally visible but force hidden => unforce instance (show)

Yes, absolutely Exactly this. Concise and clear!

  • if visible naturally => force hide this instance
  • if naturally visible but force hidden => unforce instance (show)

Currently, there are some issues with these two areas, and sometimes they are not handled correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready The fix or solution is ready to be verified
Projects
None yet
Development

No branches or pull requests

2 participants