HasAnyActiveFocus
Overview
Section titled “Overview”Returns true if any PrismaView currently has active input focus. This is a global check useful for determining if any UI element is currently receiving input across all views.
Syntax
Section titled “Syntax”bool HasAnyActiveFocus();Parameters
Section titled “Parameters”None.
Return Value
Section titled “Return Value”- Type:
bool - Returns:
trueif any view has active focus; otherwise,false
Usage Examples
Section titled “Usage Examples”// Check if any UI has focusif (PrismaUI->HasAnyActiveFocus()) { SKSE::log::info("Some UI element has active focus");} else { SKSE::log::info("No UI elements have focus");}// Use for global game pause managementvoid UpdateGameState() { if (PrismaUI->HasAnyActiveFocus()) { // Any UI is active - pause game logic if needed PauseNonUIGameplay(); } else { // No UI active - resume normal gameplay ResumeGameplay(); }}Best Practices
Section titled “Best Practices”- Global State Check: Use before performing operations that should only occur when no UI is focused
- Performance: Lightweight operation suitable for frequent checks
- Multi-Plugin: Essential for cross-plugin input coordination