io.MouseDown[0]=g_MousePressed[0]||(mouse_buttons&SDL_BUTTON(SDL_BUTTON_LEFT))!=0;// If a mouse press event came, always pass it as "mouse held this frame", so we don't miss click-release events that are shorter than 1 frame.
// We need to use SDL_CaptureMouse() to easily retrieve mouse coordinates outside of the client area. This is only supported from SDL 2.0.4 (released Jan 2016)
io.MouseDown[0]=g_MousePressed[0]||(mouse_buttons&SDL_BUTTON(SDL_BUTTON_LEFT))!=0;// If a mouse press event came, always pass it as "mouse held this frame", so we don't miss click-release events that are shorter than 1 frame.
// We need to use SDL_CaptureMouse() to easily retrieve mouse coordinates outside of the client area. This is only supported from SDL 2.0.4 (released Jan 2016)
io.MouseDown[i]=g_MousePressed[i]||glfwGetMouseButton(g_Window,i)!=0;// If a mouse press event came, always pass it as "mouse held this frame", so we don't miss click-release events that are shorter than 1 frame.
g_MousePressed[i]=false;
io.MouseDown[i]=g_MouseJustPressed[i]||glfwGetMouseButton(g_Window,i)!=0;// If a mouse press event came, always pass it as "mouse held this frame", so we don't miss click-release events that are shorter than 1 frame.
// (We pass an error message in the assert expression as a trick to get it visible to programmers who are not using a debugger, as most assert handlers display their argument)
IM_ASSERT(g.IO.DeltaTime>=0.0f&&"Need a positive DeltaTime (zero is tolerated but will cause some timing issues)");
IM_ASSERT(g.Style.Alpha>=0.0f&&g.Style.Alpha<=1.0f&&"Invalid style setting. Alpha cannot be negative (allows us to avoid a few clamps in color computations)");
IM_ASSERT((g.FrameCount==0||g.FrameCountEnded==g.FrameCount)&&"Forgot to call Render() or EndFrame() at the end of the previous frame?");
// If a child window has the ImGuiWindowFlags_NoScrollWithMouse flag, we give a chance to scroll its parent (unless either ImGuiWindowFlags_NoInputs or ImGuiWindowFlags_NoScrollbar are also set).
// If a child window has the ImGuiWindowFlags_NoScrollWithMouse flag, we give a chance to scroll its parent (unless either ImGuiWindowFlags_NoInputs or ImGuiWindowFlags_NoScrollbar are also set).
ImRectrect_to_avoid(ref_pos.x-16,ref_pos.y-8,ref_pos.x+24,ref_pos.y+24);// FIXME: Completely hard-coded. Store boxes in mouse cursor data? Scale? Center on cursor hit-point?
ImVec2MousePos;// Mouse position, in pixels. Set to ImVec2(-FLT_MAX,-FLT_MAX) if mouse is unavailable (on another screen, etc.)
boolMouseDown[5];// Mouse buttons: left, right, middle + extras. ImGui itself mostly only uses left button (BeginPopupContext** are using right button). Others buttons allows us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API.
floatMouseWheel;// Mouse wheel: 1 unit scrolls about 5 lines text.
floatMouseWheel;// Mouse wheel: 1 unit scrolls about 5 lines text.
floatMouseWheelH;// Mouse wheel (Horizontal). Most users don't have a mouse with an horizontal wheel, may not be filled by all back ends.
boolMouseDrawCursor;// Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor).
boolKeyCtrl;// Keyboard modifier pressed: Control
boolKeyShift;// Keyboard modifier pressed: Shift
@ -1651,9 +1652,12 @@ struct ImFontAtlas
IMGUI_APIintAddCustomRectRegular(unsignedintid,intwidth,intheight);// Id needs to be >= 0x10000. Id >= 0x80000000 are reserved for ImGui and ImDrawList
IMGUI_APIintAddCustomRectFontGlyph(ImFont*font,ImWcharid,intwidth,intheight,floatadvance_x,constImVec2&offset=ImVec2(0,0));// Id needs to be < 0x10000 to register a rectangle to map into a specific font.
ImVec2TexUvWhitePixel;// Texture coordinates to a white pixel
ImVector<ImFont*>Fonts;// Hold all the fonts returned by AddFont*. Fonts[0] is the default font upon calling ImGui::NewFrame(), use ImGui::PushFont()/PopFont() to change the current font.
ImVector<CustomRect>CustomRects;// Rectangles for packing custom texture data into the atlas.