Spielerando

A second small camera view shows another place, and clicks in it hit the main map

A small window that shows a faraway base or a followed unit is a second camera, and the mouse must know which one it is over. Treating the whole screen as the main view sends clicks to the wrong place, and a drag that starts in the small window must not leak out. Here is the lookup and the rule for drags.

Why this works

Every view is its own little window onto the world, so a click must be understood in the window that owns it. Keeping that choice from press to release means a drag that starts in one view cannot suddenly act in another.

When not to use it

Not needed when the small view is only decoration or a read-only minimap. Then let it block clicks and show it, and skip the extra camera and capture logic; or open the second place as its own full screen instead.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 42 lines of example code with 4 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "A second small camera view shows another place, and clicks in it hit the main map" (read_entry strategy-picture-in-picture-click-target) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP