Joker button

From MIB-Helper.com Wiki
Revision as of 10:59, 19 January 2025 by Mr-fix (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The asterix button on the steering wheel.

Joker button Navigation functions

This checks if Joker button is set to one of the navigation-related functions. This is stored in Persistance namespace 1006, key 10.

  private boolean isNaviFunctionSet() {
       int n = this.getApplication().getFrameworkAccess().getStorageMgr().getInt(1006, 10, -1);
       return n == 3 || n == 4 || n == 5 || n == 10 || n == 11;
   }

Joker button storing function

This is called to store selected option to the persistence namespace 1006. Storing Joker option will use this.persistenceKey = 10; as 10 is the key for Joker function.

   public void writePersistentViewOptionState(PersistentMenuEntry persistentMenuEntry, int n) {
       if (this.storageAccess != null) {
           this.storageAccess.setInt(1006, this.persistenceKey, n);
       }
   }

Joker button Long Press

This function is responsible for opening popup window with Joker function option. This menu normally can be accessed from the CAR menu. But over here we can see that it's also called if the Joker button is long-pressed.

   protected void handleJokerKeyLongpress() {
       this.getLogChannel().log(-2137614336, "[JokerKeyComponentEvo#handleJokerKeyLongPress] show joker key popup");
       this.getApplication().getFrameworkAccess().getHmiServiceApp().showPopup(-953743104);

Potentially we could remap the long-press action of this button if changing the showPopup(-953743104) to something else.