RegisterControlsListener overrides InputBar.addInputBar("WorldMap_Edit"

Hi, @FlyingRaccoon I’ve written a new UI addon that can create and apply per
aircraft device control presets across all devices, so you don’t have to
manually go and change device presets each time you change aircraft type that
needs it (eg: from plane to helicopter and vice versa). After some work (ha!)
it all seems to work fine, even handling cold swapping of different devices
changing the device lineup. A video explainer is here (unlisted currently due
to this issue) However, I’ve hit a showstopper issue. A key part of this is
being able to do the following: this.m_ControlsListener =
in order to access the devices and device presets, so you can assign them to
aircraft. However, this RegisterControlsListener (after debugging to find the
cause) is now triggering some function somewhere that is clearing the InputBar
on the world map, so all you see on the bottom left input bar is “Go Back”

it should be showing the full set of InputBar buttons set up in
FlightPlanning.js this.initFlight line InputBar.addInputBar(“WorldMap_Edit”,
“WorldMap”, inputBarParams);
Obviously this is a serious
breaking of the UX, as that WorldMap_Edit InputBar has more than a few
critical buttons to allow the user to do things they need to on the map. From
my analysis it seems the RegisterControlsListener is defaulting to overriding
the InputBar World Map buttons with one from the Control Options screen, as
when I switch planes with a new set of control presets (which is directly
switching what’s in Control Options) and go back to the map I sometimes see
That Apply and Save is what you
see in the Control Options screen InputBar when you change a preset. But this
isn’t needed in order to do this programmatically, as from my testing the
changed presets work fine in fly mode. So my question is: Is there any way to
stop RegisterControlsListener from kicking off a rewrite or clearing of the
world map InputBar, so it leaves the functionality alone? It would be great if
RegisterControlsListener was aware enough to know to only override the
InputBar if it is in Control Options screen. Aircraft Specific Control
Profiles is a long standing community request and this is an effort to resolve
that as an addon. You can see [Aircraft-specific control profiles MSFS
profiles/153199) with 757 votes. Discovery flights don’t auto switch control
profiles based on aircraft type and it would be optimal UX if they did. For
example, if you load a helicopter discovery flight it should auto load one of
your default helicopter presets, for a plane it should load a defaut aircraft
preset. It’s far less confusing for the user if at least the basic control
presets are consistent with the aircraft being flown in a discovery flight,
and as you provide a number of built in presets it would make sense to do
that. Perhaps Asobo has it on the roadmap already, I don’t know, but would be
great to have! Hope that makes sense. Thanks,

From past experience, calling RegisterControlsListener breaks the pause
menu in the same way while in the simulation.

Hello @sonicviz Our assumption is that your view creates an additional
InputBar on top of the world map one, that is then not cleared. Can you try to
call InputBar.clearInputBar(“WIDGET_OPTIONS”) when you leave your custom
control view, at the moment you unregister from the control listener? Regards,

Hey @FlyingRaccoon Many thanks for the help, that solves the problem. Thanks,

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.