Jump to content

Recommended Posts

Posted

I wanted to detect if the MCM menu is open for the hotkeys in my mcm menu. Alternatively to detect that no menu is open. I have the key conflict control in MCM working but I noticed that the actions for the keys still fire when in the menu, I'd like to stop that for when other users with config menus that have key conflict might detect a conflict with my menu keys.

 

I have tried

If code == hotkey && !UI.IsMenuOpen("Main Menu")

 

but once in the MCM menu the main menu is closed and I don't see anything else useful here:

https://www.creationkit.com/index.php?title=UI_Script

 

 

 

diziet

Posted

Instead use if (!Utility.IsInMenuMode())

 

UI.IsMenuOpen checks for a specific menu, while the above is for all menus. I think it checks though if the game is paused, so it could conflict with a mod like Skyrim Souls, which un-pauses the game during some menus.

Posted (edited)

This is a safety process block I developed for one of my mods. It helps to determine when it is safe to process the key press. You are more than welcome to use it. Probably requires SKSE but not 100% certain on that.

 

  Reveal hidden contents

 

 

EDIT: In case it is not clear the return value of the safety process block needs to be true in order to allow the key press to be processed.

Edited by IsharaMeradin
Posted
  On 9/24/2020 at 11:35 AM, IsharaMeradin said:

This is a safety process block I developed for one of my mods. It helps to determine when it is safe to process the key press. You are more than welcome to use it. Probably requires SKSE but not 100% certain on that.

 

  Reveal hidden contents

 

 

EDIT: In case it is not clear the return value of the safety process block needs to be true in order to allow the key press to be processed.

 

Thanks for the example script <3

  • 6 months later...
Posted
  On 9/24/2020 at 11:35 AM, IsharaMeradin said:

This is a safety process block I developed for one of my mods. It helps to determine when it is safe to process the key press. You are more than welcome to use it. Probably requires SKSE but not 100% certain on that.

 

 

THANK YOU!!!

  • 1 year later...
Posted

I know this is an old topic, but I am still using this code and I also added to it to make it compatible with Skyrim Souls. Here's the updated code:

 

 

  Reveal hidden contents

 

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...