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()
|
void ImGuiFullscreen::ForceKeyNavEnabled()
|
||||||
{
|
{
|
||||||
ImGuiContext& g = *ImGui::GetCurrentContext();
|
ImGuiContext& g = *ImGui::GetCurrentContext();
|
||||||
g.ActiveIdSource = (g.ActiveIdSource == ImGuiInputSource_Mouse) ? ImGuiInputSource_Keyboard : g.ActiveIdSource;
|
g.ActiveIdSource = (g.ActiveIdSource == ImGuiInputSource_Mouse || g.ActiveIdSource == ImGuiInputSource_None) ?
|
||||||
g.NavInputSource = (g.NavInputSource == ImGuiInputSource_Mouse) ? ImGuiInputSource_Keyboard : g.ActiveIdSource;
|
ImGuiInputSource_Keyboard :
|
||||||
|
g.ActiveIdSource;
|
||||||
|
g.NavInputSource = (g.NavInputSource == ImGuiInputSource_Mouse || g.NavInputSource == ImGuiInputSource_None) ?
|
||||||
|
ImGuiInputSource_Keyboard :
|
||||||
|
g.ActiveIdSource;
|
||||||
g.NavDisableHighlight = false;
|
g.NavDisableHighlight = false;
|
||||||
g.NavDisableMouseHover = true;
|
g.NavDisableMouseHover = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue