ImGuiFullscreen: Default input source to keyboard if none
This commit is contained in:
parent
88e14dd3ff
commit
57ca5dd2c2
|
@ -675,8 +675,12 @@ ImGuiFullscreen::FocusResetType ImGuiFullscreen::GetQueuedFocusResetType()
|
|||
void ImGuiFullscreen::ForceKeyNavEnabled()
|
||||
{
|
||||
ImGuiContext& g = *ImGui::GetCurrentContext();
|
||||
g.ActiveIdSource = (g.ActiveIdSource == ImGuiInputSource_Mouse) ? ImGuiInputSource_Keyboard : g.ActiveIdSource;
|
||||
g.NavInputSource = (g.NavInputSource == ImGuiInputSource_Mouse) ? ImGuiInputSource_Keyboard : g.ActiveIdSource;
|
||||
g.ActiveIdSource = (g.ActiveIdSource == ImGuiInputSource_Mouse || g.ActiveIdSource == ImGuiInputSource_None) ?
|
||||
ImGuiInputSource_Keyboard :
|
||||
g.ActiveIdSource;
|
||||
g.NavInputSource = (g.NavInputSource == ImGuiInputSource_Mouse || g.NavInputSource == ImGuiInputSource_None) ?
|
||||
ImGuiInputSource_Keyboard :
|
||||
g.ActiveIdSource;
|
||||
g.NavDisableHighlight = false;
|
||||
g.NavDisableMouseHover = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue