forked from Mihara/RasterPropMonitor
-
Notifications
You must be signed in to change notification settings - Fork 16
Allow selecting patches #165
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
Merged
JonnyOThan
merged 15 commits into
FirstPersonKSP:master
from
andymac-2:scroll-through-patches
Oct 3, 2025
Merged
Changes from 11 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
cccf21d
Allow Selecting orbital patches in IVA
26c0290
Merge branch 'master' into scroll-through-patches
5708fc7
Merge branch 'master' into scroll-through-patches
JonnyOThan 21bba4d
Update StringProcessor.cs
JonnyOThan 63b9727
Minimise diff, respond to some PR comments, will do some more updates…
0f4b1ab
Minimise diff 2, remove class, still more to go
9024599
Reduce diff even further.
083973c
Remove whitespace changes, fix btton click sound
7b8e258
fix button click sound
8591aac
Revert whitespace changes
1cab956
Render next patch. This wasn't working previously until the draw code…
751cb68
Made vairables pod local, not monitor local
99d77dc
Merge branch 'master' into scroll-through-patches
JonnyOThan 382dea9
remove some vestiges of monitor-local variables
JonnyOThan 2ebebf1
remove some vestiges of monitor-local variables
JonnyOThan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| namespace JSI | ||
| { | ||
| internal interface IPageElement | ||
| { | ||
| void HandlePageCreate(RasterPropMonitor propMonitor); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this necessary? There's already a lot of ways to customize page behaviors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
RasterPropMonitorcontains the state of which orbital patch is selected instead ofRPMVesselComputer, otherwise all screens show the same thing, even if you only change one. Currently there's no way to pass theRasterPropMonitorinstance to the pages themselves.There are two main ways I considered. Either add another config variable into the
ConfigNodewhich exposes it publicly and makes it hard to change later since you don't know if downstream dependencies use it, or use an internal interface. I chose the latter.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure that scansat or vesselviewer page states are not shared between monitors in the same pod. Is there a way to use the same pattern?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those states are local to the page not the monitor. There are other cases like that e.g. the science and target menus. They are not local to the monitor itself. If I switch from one orbital patch on the map screen, on the orbit screen, it will still stay at the old value. Potentially, I could create a "composite" page that contains both pages, but that might require some modification to the page clicking code to allow pages to capture it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thanks. Let me think about it...
Another example is generic switches; they create persistent variables to track their state per prop. And maybe this state could be stored in the JSIOrbitDisplay? I'm not sure if that's instantiated per monitor or per pod.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might have to provide an example, I'm not sure what you mean when you refer to a "generic switch"
We end up with a worse problem where we need to thread the state of the
JSIOrbitDisplayeverywhere it's needed. Even the text on the map display wouldn't sync up unless you passed it in.