Skip to content

HasFocus

Checks if the specified PrismaView has input focus. This method is useful for determining whether the UI is currently receiving user input, which can help manage game state and input handling.

bool HasFocus(PrismaView view);
  • Type: PrismaView
  • Description: The PrismaView to check for focus state
  • Type: bool
  • Returns: true if the PrismaView has focus; otherwise, false
// Simple focus state check
if (PrismaUI->HasFocus(view)) {
logger::info("View has focus - UI is active");
} else {
logger::info("View does not have focus - UI is inactive");
}