RunicVTT Open Source Virtual Tabletop for TTRPG using P2P
Loading...
Searching...
No Matches
UiTypingGuard Namespace Reference

Functions

void TrackThisInput ()
 
bool IsTyping ()
 
void FrameReset ()
 

Variables

bool g_isTyping = false
 

Function Documentation

◆ FrameReset()

void UiTypingGuard::FrameReset ( )
inline

Definition at line 26 of file UiTypingGuard.h.

27 {
28 if (!ImGui::IsAnyItemActive())
29 g_isTyping = false;
30 }

◆ IsTyping()

bool UiTypingGuard::IsTyping ( )
inline

Definition at line 20 of file UiTypingGuard.h.

21 {
22 return g_isTyping;
23 }
Here is the caller graph for this function:

◆ TrackThisInput()

void UiTypingGuard::TrackThisInput ( )
inline

Definition at line 11 of file UiTypingGuard.h.

12 {
13 // true while the last item (the input) is active
14 if (ImGui::IsItemActive())
15 g_isTyping = true;
16 else if (!ImGui::IsAnyItemActive())
17 g_isTyping = false; // automatic clear when nothing is active
18 }
Here is the caller graph for this function:

Variable Documentation

◆ g_isTyping

bool UiTypingGuard::g_isTyping = false
inline

Definition at line 8 of file UiTypingGuard.h.