Set Elsewhen's here by tapping a city on the globe (#13438)
A city on this machine's zone becomes homeCity, the zone's own city clears it, and a city on another zone leaves it alone. Ported from omacom/elsewhen#5. Co-authored-by: Shawn Yeager <shawn@shawnyeager.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
5 files changed
+38
-3
No files matched your search
@@ -56,6 +56,7 @@ Item {
|
||||
signal offsetModeToggleRequested()
|
||||
// Only real selections: -1 means "no city" here but "home" in the list.
|
||||
signal citySelected(string label, string zone)
|
||||
signal cityTapped(string label, string zone)
|
||||
|
||||
// ---- data -------------------------------------------------------------
|
||||
property var land: [] // coastline rings, flat [lon,lat,...]
|
||||
@@ -96,7 +97,10 @@ Item {
|
||||
function pickAt(cx, cy) {
|
||||
var hit = hitAt(cx, cy)
|
||||
selectAt(hit)
|
||||
if (hit >= 0) flyTo(allCities[hit][2], allCities[hit][3])
|
||||
if (hit >= 0) {
|
||||
flyTo(allCities[hit][2], allCities[hit][3])
|
||||
cityTapped(allCities[hit][0], allCities[hit][1])
|
||||
}
|
||||
return hit
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user