updated to latest imgui

This commit is contained in:
Anthony Pesch 2017-12-03 23:23:37 -05:00
parent 4fb509246a
commit 3fed26256f
2 changed files with 4 additions and 2 deletions

View File

@ -806,6 +806,7 @@ ImGuiIO::ImGuiIO()
KeyRepeatDelay = 0.250f;
KeyRepeatRate = 0.050f;
NavMovesMouse = false;
NavScoreScaleX = 0.1f;
UserData = NULL;
Fonts = &GImDefaultFontAtlas;
@ -2121,8 +2122,8 @@ static bool NavScoreItem(ImRect cand)
// Bias the contribution of each axis to favor horizontal movements
// TODO perhaps this scale could be dynamic based on the currently
// selected items size
float sy = 5.0f;
float sx = 1.0f / sy;
float sx = g.IO.NavScoreScaleX;
float sy = 1.0f;
// Calculate the distance between the two items on both axes
float dax = NavScoreItemAxialDist(cand.Min.x, cand.Max.x, curr.Min.x, curr.Max.x) * sx;

View File

@ -839,6 +839,7 @@ struct ImGuiIO
float KeyRepeatDelay; // = 0.250f // When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.).
float KeyRepeatRate; // = 0.050f // When holding a key/button, rate at which it repeats, in seconds.
bool NavMovesMouse; // = false // Directional navigation can move the mouse cursor. Updates MousePos and set WantMoveMouse=true. If enabled you MUST honor those requests in your binding, otherwise ImGui will react as if mouse is jumping around.
float NavScoreScaleX; // = 0.1f // Amount by which to scale X axis contributions when scoring navigation movements. Since navigation movements are determined by finding the item nearby with the lowest score, smaller scale values will cause navigation to favor movements along that axis.
void* UserData; // = NULL // Store your own data for retrieval by callbacks.
ImFontAtlas* Fonts; // <auto> // Load and assemble one or more fonts into a single tightly packed texture. Output to Fonts array.