Jump to content

Get state of stage lock?


Recommended Posts

  • 4 weeks later...
[quote name='Coffeeman']I've figured it out. For the record, the solution is [FONT=Courier New]!InputLockManager.lockStack.Keys.Contains("manualStageLock")[/FONT] (no space in manualStageLock, but for some reason it adds one.)[/QUOTE]
You can use [FONT=courier new]InputLockManager.IsLocked(ControlTypes.STAGING)[/FONT], which seems to be the more robust way. [FONT=courier new]ControlTypes [/FONT]is an enum, you can get a lot of other locks that way, too, and do not depend on runtime-behavior (string contents are fragile) but have compile-time ensurance that the argument is valid.[FONT=courier new][/FONT]
Link to comment
Share on other sites

Note that different control locks are additive.

If you enable the .CustomActionGroups lock, that will cause the .All lock to return true also even if only the .CustomActionGroup lock is engaged.

You can check how this cascades via the bitmask of the enum, non-binary divisible bitmasks (2,4,8,16,etc.) are groups of smaller control locks.

(On my mobile so can't post examples.)

D. Edited by Diazo
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...