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

Speed Limits tool full rewrite/refactor; Render overlay refactor #991

Draft
wants to merge 27 commits into
base: master
Choose a base branch
from

Conversation

kvakvs
Copy link
Collaborator

@kvakvs kvakvs commented Aug 9, 2020

New Speed Limits UI

NOTE: SVG source for two types of Road Signs are text (XML) files, taking a few thousands of lines, contributing to a huge added lines count. And deleted lines are rather moved, not actually deleted, contributing to both added and removed counts.

U User Interface

  • U atlas loading reworked, now sprites to be loaded can have different paths and sizes, not just different names
  • U now does not require explicit stacking call for new controls and it is a setting of autoresizer.
  • Texture loading code for speed limit overlay now uses MIP maps (smoothing small icons to look good).

Speed Limits & UI Changes

  • SpeedLimits legacy tool was deleted and the code moved to new SpeedLimits tool.
  • Overlay rendering for SpeedLimits now has its own renderer class
  • SpeedLimit rendering code now does not perform click handling, and the logic is called later from tool LeftClick handler.
  • Overlay DrawTexture calls now moved from TrafficManagerTool to their own Highlight class.
  • Get/SetSpeedLimit are not using float? anymore, and there are enumerated types explicitly saying if its not set, or set to unlimited.
  • Road signs redone in vector (SVG via Inkscape) for German-style signs and blue road defaults.
    bild
  • Default speed limits now have new blue icons.
    bild
  • Overlay now shows override speed limits, but if you hold alt, also shows default speed limits as small icons.
  • Overlay now shows default speed limits, but if you hold alt, also shows default override limits as small icons.
    bild
  • Road signs for speed limits have opacity fading with distance.
    bild

Other TODO

  • Holding CTRL in priority tool shows all info overlays. Expected: Only those required for the tool.
  • Overlays for Parking / Vehicle Restrictions disappeared, fix me (Hint: Renders in different coords, can be seen if you rotate the camera)
  • Edit default speeds mode
  • Button texture update on Toggle Edit Segment/Lane
  • Button texture update on Edit Defaults/Edit Overrides toggle
  • Nice buttons for speed palette
  • MPH toggle should refresh the palette
  • Clicking a speed icon should have different effect based on whether overrides or defaults are edited now
  • Consider kmph/mph alternative units text under the selected button like in the old UI?
  • Refreshing the palette/tool window should save the window position.
  • Showing full screen/segment operation with/without shift is displayed inverse but works OK.

Also

Fixes #988

kvakvs added 27 commits June 24, 2020 16:31
WIP refactoring
Rebase on master
…mph refreshes window; Show alternate units below
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.

Speed Limit interface km/h to MPH unit conversion is wrong
1 participant