kbin-kes icon indicating copy to clipboard operation
kbin-kes copied to clipboard

[FEAT] Public API method that lets mods open their own settings pages

Open aclist opened this issue 5 months ago • 0 comments

For convenience, I'd like to provide a method that lets mods expose (where necessary) an interactable element that takes the user directly to the mod's own settings page inside of MES.

MES uses openTab() and openHelpBox() for this, but these are not available in the mods' scope.

Something simple like openOwnPage(). Ideally, identification of the mod would be reflexive to the context calling this function, so additional parameters (e.g., openOwnPage("Subscriptions omnibar")) would not be needed.

However, it gets a bit complicated here, because the mod functions themselves don't have any identifying information about their own internal name just yet, unless the manifest JSON travels around between MES and mod functions.

Edit: going to use a stack trace to find the calling mod and compare it against the JSON, hopefully.

aclist avatar Jul 03 '25 04:07 aclist