-
Notifications
You must be signed in to change notification settings - Fork 85
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
Themed default speed signs #1320
Conversation
It's placed under existing speed theme stuff on general options tab.
In normal view / persistent overlays: - Default off, so themed icons shown for default speeds - When on, unthemed icons will be shown for default speeds In defaults view: - Unthemed icons always used (existing functionality)
Might have got a little carried away ...and refactored the segment and lane overlay code. Found what was causing the weird sizing of lane icons so fixed that too. Also, Hopefully speed limit overlays are a little faster but I'm not sure how to properly benchmark stuff. Note: I've not tested the monorail stuff (where it adds an extra icon on roads which contain monorail). |
@kvakvs In EDIT: I guess if we know mouse hovering an icon in one segment, we don't need to check for hover in any other segments? But rather than passing it around through method returns, it would be better to add to drawEnv? |
Goal to beat: 11.6.4.2 - Render latency: 23 ms |
I think this was used to add to the hovered boxes list on render, but later the code was moved deeper into sub-functions. |
how did you measure that? Stopwatch around the method call or something different? (I usually use |
- Most fields in `DrawEnv` now `private set` properties - Some logic moved to new `ResetCacheIfNecessary()` - Simplified params of the segment/lane rendering methods - Cull excess `ContainsMouse()` checks where possible - Reduced instantiations of `OverlayHandleColorController()` - Removed some old `hover` code
I used nvidia If you want to do proper test your way - 11.6.4.2 vs. this PR - that would be much appreciated; for all I know I might still have made it slower than it was before. I'm going to re-ponder what best field name & text for the new mod option should be, then I'll set that up on Crowdin. Note there's a blocking PR required to be merged prior to this one; #1321 |
|
||
// Ignore: Bad segments | ||
if (!segment.IsValid()) { |
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.
Removed this because it's already included in segment.MayHaveCustomSpeedLimits()
/// <param name="segCenter">Bezier center for the segment to draw at.</param> | ||
/// <param name="camPos">Camera.</param> | ||
/// <param name="args">Render args.</param> | ||
private bool DrawSpeedLimitHandles_PerSegment(ushort segmentId, |
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.
This wrapper method became superfluous after refactoring so removed 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.
Glad you're having fun 😀
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 couldn't find any references to it so hopefully it doesn't break anything heh.
I assume this will also go in 11.6.5 as planned? |
@krzychu124 I'm not sure now. Maybe a better approach would be to always show themed signs in normal/overlay mods but with a "green dot" sub-icon if the speed is same as default for the network. I think that would lead to much smaller code change and be better for end-users. |
Question is if they want to know if speed is different than default🤔 |
Well, if we're adding green blob to bottom of themed sign, it will indicate that segment/lane is using default speed. No green blob = fully custom speed. We could flip it the other way round, eg. show some sort of "customised" indicator on the non-default speed icons, but I'm not sure what that icon could look like. |
Not bad idea, maybe it won't be annoying for users like green signs in US/UK theme or others where signs are not round - you know.. AN (replace speed signs, add stop/yield signs), full immersion 😄 I assume that "defaults speeds mode" remains as is - full green sings? |
Yes, default speeds will remain with unthemed signs. I'll have a go later tonight at doing a smaller PR that does the green blobs thing. I think ideally we need a separate |
Yup, I already have some scraps for most performant access to node/segment/vehicles on screen in |
Closing in favor of #1404 |
TMPE.zip
This is based on user-feedback resulting from 11.6.4.0 STABLE release #1221 (comment)
This PR adds a new mod option,
Options.differentiateDefaultSpeedsInNormalView
, which isfalse
by default. It is modified via aCheckboxOption
on the General options tab:In normal view / persistent overlays:
false
: themed icons depict default speedstrue
: unthemed icons depict default speedsIn defaults view:
Also fixes the issue with overly large lane icons #1221 (comment)
Screenshots...
Normal mode, option is
false
(default state):Normal mode, option is
true
:Defaults mode, regardless of option state:
Persistent overlay, option is
false
:Persistent overlay, option is
true
:Todo:
Possible future enhancements: