Skip to content

Focus

Sets input focus to the specified PrismaView and shows the cursor. This method activates the UI for user interaction and optionally pauses the game to provide an uninterrupted interface experience.

bool Focus(PrismaView view, bool pauseGame = false);
  • Type: PrismaView
  • Description: The PrismaView to receive focus
  • Type: bool
  • Default: false
  • Description: Optional parameter to pause the game when focus is active
  • Type: bool
  • Returns: true if focus was successfully set; otherwise, false
// Simple focus without pausing the game
bool success = PrismaUI->Focus(view);
if (success) {
logger::info("View focused successfully");
} else {
logger::error("Failed to focus view");
}
  • Game Pause Management: Use pauseGame = true for menus that require full user attention
  • Focus Pairing: Always pair Focus calls with corresponding Unfocus calls