The cursor should definitely stay hidden if you hide it. Maybe you move mouse over some other invisible control, that wants to show the cursor? You can use
mcForceNone to avoid this.
The logic is: the top-most UI control under mouse determines the cursor.
… Unless any UI control under the mouse has
mcForceNone, then the cursor is always hidden.
Note that you can also use
Window.Container.OverrideCursor to force a specific cursor, completely regardless of what UI controls say.
As for adding
inner.castle-user-interface (which may be
- inside another
outer.castle-user-interface (which may be a state design, i.e.
this is absolutely possible and indeed I think it’s a good approach in your case. You can do it by:
TCastleDesign inside your
outer.castle-user-interface. At runtime (or at design-time) you can set the
URL of this
TCastleDesign instance to point to e.g.
or do it entirely by code, using
UserInterfaceLoad('castle-data:/locations/location1.castle-user-interface', ...) to load the location UI and then add it to the scene.
examples/advanced_editor/ for example.
Note: you should carefully choose the place where you load things “specific to locations”. Above I described what to do if each location is a new UI control, something descending from
TCastleUserInterface. But you may as well choose that all UI controls (including e.g. TCastleViewport) should stay constant, i.e. within
outer.castle-user-interface and you only want to change some TCastleTransform / TCastleScene inside. A very similar answer applies in this case:
you can use
Viewport.Items. You can switch the URL (at runtime or design-time) of
TCastleTransformDesign to point to some
or you can load
inner.castle-transform file by
Example also in