Replace split lat/lon inputs with single combined coordinate field - #57
Merged
Conversation
- Add OsmLevelLoader.TryParseCoordinates() static helper for parsing "lat, lon" strings - Replace separate lat/lon fields with single Coordinates field in CoordinateEntryHud (IMGUI) - Replace separate lat/lon TMP_InputFields with single Coordinates field in StartupMenuUi (uGUI) - Add 11 unit tests for TryParseCoordinates covering valid/invalid/edge cases Co-authored-by: adam133 <20442729+adam133@users.noreply.github.com> Agent-Logs-Url: https://github.com/adam133/terradrive/sessions/bc83221f-b747-486e-8056-e5ceecfbbca7
Copilot
AI
changed the title
[WIP] Rework coordinates input to use single string for parsing
Replace split lat/lon inputs with single combined coordinate field
Mar 21, 2026
adam133
marked this pull request as ready for review
March 21, 2026 20:55
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
On macOS, pasting coordinates into separate Latitude/Longitude fields drops minus signs, commas, and decimal points, making manual coordinate entry unreliable. Consolidates the two fields into one
"lat, lon"string input.Changes
OsmLevelLoader— newTryParseCoordinates(string, out double, out double)static helper: splits on first comma, trims whitespace, parses each part with invariant cultureCoordinateEntryHud(IMGUI in-game dialog) — merged_latStr/_lonStr→ single_coordsStr; added hint labele.g. 51.5074, -0.1278StartupMenuUi(uGUI startup menu) — merged_latField/_lonField→ single_coordsFieldwithContentType.Standardso all characters (minus, comma, period, space) paste freely; panel height reduced 40pxOsmLevelLoaderTests— 11 new unit tests forTryParseCoordinatescovering valid inputs, whitespace variants, null/empty, missing comma, and non-numeric partsOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.