@ -14,18 +14,19 @@ You may use the Issue Tracker to submit bug reports, feature requests or suggest
**Guidelines to report an issue or ask a question:**
**Guidelines to report an issue or ask a question:**
- Please provide your imgui version number.
- Please provide your imgui version number.
- If you are discussing an assert or a crash, please provide a debugger callstack.
- If you are discussing an assert or a crash, please provide a debugger callstack. Never state "it crashes" without additional information.
- Please state if you have made substantial modifications to your copy of imgui.
- Please state if you have made substantial modifications to your copy of imgui.
- When discussing issues related to rendering or inputs, please state the OS/back-end/renderer you are using. Please state if you are using a vanilla copy of one of the back-end (imgui_impl_xxx files), or a modified one, or if you built your own.
- When discussing issues related to rendering or inputs, please state the OS/back-end/renderer you are using. Please state if you are using a vanilla copy of one of the back-end (imgui_impl_xxx files), or a modified one, or if you built your own.
- Try to be explicit with your expectations and what you have tried.
- Please provide a Minimal, Complete and Verifiable Example ([MCVE](https://stackoverflow.com/help/mcve)) to demonstrate your problem. An ideal submission includes a small piece of code that anyone can paste in one of the examples/ application (e.g. in main.cpp or imgui_demo.cpp) to understand and reproduce it. Narrowing your problem to its shortest and purest form is the easiest way to understand it. Please test your shortened code to ensure it actually exhibit the problem. Often while creating the MCVE you will end up solving the problem! Many questions that are missing a standalone verifiable example are missing the actual cause of their issue in the description, which ends up wasting everyone's time.
- Please provide a Minimal, Complete and Verifiable Example ([MCVE](https://stackoverflow.com/help/mcve)) to demonstrate your problem. An ideal submission includes a small piece of code that anyone can paste in one of the examples/ application (e.g. in main.cpp or imgui_demo.cpp) to understand and reproduce it. Narrowing your problem to its shortest and purest form is the easiest way to understand it. Please test your shortened code to ensure it actually exhibit the problem. Often while creating the MCVE you will end up solving the problem! Many questions that are missing a standalone verifiable example are missing the actual cause of their issue in the description, which ends up wasting everyone's time.
- Try to attach screenshots to clarify the context. They often convey useful information that are omitted by the description. You can drag pictures/files here (prefer github attachments over 3rd party hosting).
- Try to attach screenshots to clarify the context. They often convey useful information that are omitted by the description. You can drag pictures/files here (prefer github attachments over 3rd party hosting).
- When requesting a new feature, please describe the usage context (how you intend to use it, why you need it, etc.).
- When requesting a new feature, please describe the usage context (how you intend to use it, why you need it, etc.).
- Due to frequent abuse of this service from a certain category of users, if your GitHub account is anonymous and was created five minutes ago please understand that your post will receive more scrutiny and less patience for incomplete questions.
- Due to frequent abuse of this service from a certain category of users, if your GitHub account is anonymous and was created five minutes ago please understand that your post will receive more scrutiny and less patience for incomplete questions.
If you have been using dear imgui for a while and/or have been using C/C++ for several years and/or have demonstrated good behavior here, it is ok to not fullfill every item to the letter. Those are guidelines and experienced users of dear imgui will know what information are useful in a given context.
If you have been using dear imgui for a while or have been using C/C++ for several years or have demonstrated good behavior here, it is ok to not fullfill every item to the letter. Those are guidelines and experienced users of dear imgui will know what information are useful in a given context.
## How to create an Pull Request
## How to create an Pull Request
- When adding a feature, please describe the usage context (how you intend to use it, why you need it, etc.).
- If you are adding a feature, please describe the usage context (how you intend to use it, why you need it, etc.).
- When fixing a warning or compilation problem, please post the compiler log and specify the version and OS you are using.
- Try to attach screenshots to clarify the context and demonstrate the feature at a glance. You can drag pictures/files here (prefer github attachments over 3rd party hosting).
- Try to attach screenshots to clarify the context and demonstrate the feature at a glance. You can drag pictures/files here (prefer github attachments over 3rd party hosting).
- Make sure you create a branch for the pull request. In Git, 1 PR is associated to 1 branch. If you keep pushing to the same branch after you submitted the PR, your new commits will appear in the PR (we can still cherry-pick individual commits).
- Make sure you create a branch for the pull request. In Git, 1 PR is associated to 1 branch. If you keep pushing to the same branch after you submitted the PR, your new commits will appear in the PR (we can still cherry-pick individual commits).
- If you are adding a feature, please explain the context of the change: what do you need the feature for?
- When adding a feature, please describe the usage context (how you intend to use it, why you need it, etc.).
- When fixing a warning or compilation problem, please post the compiler log and specify the version and OS you are using.
- Try to attach screenshots to clarify the context and demonstrate the feature at a glance.
- Try to attach screenshots to clarify the context and demonstrate the feature at a glance.
- Make sure you create a branch for the pull request. In Git, 1 PR is associated to 1 branch. If you keep pushing to the same branch after you submitted the PR, your new commits will appear in the PR.
- Make sure you create a branch for the pull request. In Git, 1 PR is associated to 1 branch. If you keep pushing to the same branch after you submitted the PR, your new commits will appear in the PR.
- You can read [CONTRIBUTING.md](https://github.com/ocornut/imgui/blob/master/.github/CONTRIBUTING.md) for more details.
- You can read [CONTRIBUTING.md](https://github.com/ocornut/imgui/blob/master/.github/CONTRIBUTING.md) for more details.
- Removed per-window ImGuiWindowFlags_ResizeFromAnySide beta flag in favor `io.OptResizeWindowsFromEdges=true` to enable the feature globally. (#1495)
- Removed per-window ImGuiWindowFlags_ResizeFromAnySide beta flag in favor `io.OptResizeWindowsFromEdges=true` to enable the feature globally. (#1495)
The feature is not currently enabled by default because it is not satisfying enough.
The feature is not currently enabled by default because it is not satisfying enough.
- Style: Renamed ImGuiCol_ModalWindowDarkening to ImGuiCol_ModalWindowDimBg for consistency with other features. Kept redirection enum (will obsolete).
- Style: Renamed ImGuiCol_ModalWindowDarkening to ImGuiCol_ModalWindowDimBg for consistency with other features. Kept redirection enum (will obsolete).
- Changed ImGui::GetTime() return value from float to double to avoid accumulating floating point imprecisions over time.
Other Changes:
Other Changes:
@ -54,6 +55,7 @@ Other Changes:
- IsItemHovered(): Added ImGuiHoveredFlags_AllowWhenDisabled flag to query hovered status on disabled items. (#1940, #211)
- IsItemHovered(): Added ImGuiHoveredFlags_AllowWhenDisabled flag to query hovered status on disabled items. (#1940, #211)
// 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).
// The reason this is exposed in imgui_internal.h is: on touch-based system that don't have hovering, we want to dispatch inputs to the right target (imgui vs imgui+app)
// The reason this is exposed in imgui_internal.h is: on touch-based system that don't have hovering, we want to dispatch inputs to the right target (imgui vs imgui+app)
voidImGui::UpdateHoveredWindowAndCaptureFlags()
voidImGui::UpdateHoveredWindowAndCaptureFlags()
{
{
@ -4288,8 +4339,9 @@ void ImGui::NewFrame()
UpdateViewports();
UpdateViewports();
// Setup font, draw list shared data
// Setup current font, and draw list shared data
// FIXME-VIEWPORT: the concept of a single ClipRectFullscreen is not ideal!
// FIXME-VIEWPORT: the concept of a single ClipRectFullscreen is not ideal!
// 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).
// Render an arrow aimed to be aligned with text (p_min is a position in the same space text would be positioned). To e.g. denote expanded/collapsed state
IMGUI_APIvoidSetItemAllowOverlap();// allow last item to be overlapped by a subsequent item. sometimes useful with invisible buttons, selectables, etc. to catch unused area.
IMGUI_APIvoidSetItemAllowOverlap();// allow last item to be overlapped by a subsequent item. sometimes useful with invisible buttons, selectables, etc. to catch unused area.
IMGUI_APIboolIsRectVisible(constImVec2&size);// test if rectangle (of given size, starting from cursor position) is visible / not clipped.
IMGUI_APIboolIsRectVisible(constImVec2&size);// test if rectangle (of given size, starting from cursor position) is visible / not clipped.
IMGUI_APIboolIsRectVisible(constImVec2&rect_min,constImVec2&rect_max);// test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side.
IMGUI_APIboolIsRectVisible(constImVec2&rect_min,constImVec2&rect_max);// test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side.
IMGUI_APIfloat GetTime();
IMGUI_APIdoubleGetTime();
IMGUI_APIintGetFrameCount();
IMGUI_APIintGetFrameCount();
IMGUI_APIImDrawList*GetOverlayDrawList();// this draw list will be the last rendered. it covers the entire current viewport. useful to quickly draw overlays shapes/text
IMGUI_APIImDrawList*GetOverlayDrawList();// this draw list will be the last rendered. it covers the entire current viewport. useful to quickly draw overlays shapes/text
IMGUI_APIImDrawListSharedData*GetDrawListSharedData();// you may use this when creating your own ImDrawList instances
IMGUI_APIImDrawListSharedData*GetDrawListSharedData();// you may use this when creating your own ImDrawList instances
@ -1182,7 +1185,7 @@ struct ImGuiIO
ImVec2MousePosPrev;// Previous mouse position temporary storage (nb: not for public use, set to MousePos in NewFrame())
ImVec2MousePosPrev;// Previous mouse position temporary storage (nb: not for public use, set to MousePos in NewFrame())
ImVec2MouseClickedPos[5];// Position at time of clicking
ImVec2MouseClickedPos[5];// Position at time of clicking
float MouseClickedTime[5];// Time of last click (used to figure out double-click)
doubleMouseClickedTime[5];// Time of last click (used to figure out double-click)
boolMouseClicked[5];// Mouse button went from !Down to Down
boolMouseClicked[5];// Mouse button went from !Down to Down
boolMouseDoubleClicked[5];// Has mouse button been double-clicked?
boolMouseDoubleClicked[5];// Has mouse button been double-clicked?
boolMouseReleased[5];// Mouse button went from Down to !Down
boolMouseReleased[5];// Mouse button went from Down to !Down
@ -1332,6 +1335,14 @@ struct ImGuiOnceUponAFrame
// Helper: Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]"
// Helper: Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]"
// Helper: Text buffer for logging/accumulating text
// Helper: Text buffer for logging/accumulating text
@ -1875,6 +1875,7 @@ struct ImFontAtlas
// Members
// Members
//-------------------------------------------
//-------------------------------------------
boolLocked;// Marked as Locked by ImGui::NewFrame() so attempt to modify the atlas will assert.
ImFontAtlasFlagsFlags;// Build flags (see ImFontAtlasFlags_)
ImFontAtlasFlagsFlags;// Build flags (see ImFontAtlasFlags_)
ImTextureIDTexID;// User data to refer to the texture once it has been uploaded to user's graphic systems. It is passed back to you during rendering via the ImDrawCmd structure.
ImTextureIDTexID;// User data to refer to the texture once it has been uploaded to user's graphic systems. It is passed back to you during rendering via the ImDrawCmd structure.
intTexDesiredWidth;// Texture width desired by user before Build(). Must be a power-of-two. If have many glyphs your graphics API have texture size restrictions you may want to increase texture width to decrease height.
intTexDesiredWidth;// Texture width desired by user before Build(). Must be a power-of-two. If have many glyphs your graphics API have texture size restrictions you may want to increase texture width to decrease height.
@ -2050,6 +2051,8 @@ struct ImGuiViewport
#if defined(__clang__)
#if defined(__clang__)
#pragma clang diagnostic pop
#pragma clang diagnostic pop
#elif defined(__GNUC__) && __GNUC__ >= 8
#pragma GCC diagnostic pop
#endif
#endif
// Include imgui_user.h at the end of imgui.h (convenient for user to only explicitly include vanilla imgui.h)
// Include imgui_user.h at the end of imgui.h (convenient for user to only explicitly include vanilla imgui.h)
// Tip: If your float aren't contiguous but part of a structure, you can pass a pointer to your first float and the sizeof() of your structure in the Stride parameter.
// Tip: If your float aren't contiguous but part of a structure, you can pass a pointer to your first float and the sizeof() of your structure in the Stride parameter.
staticfloatvalues[90]={0};
staticfloatvalues[90]={0};
staticintvalues_offset=0;
staticintvalues_offset=0;
staticfloat refresh_time=0.0f;
staticdouble refresh_time=0.0;
if(!animate||refresh_time==0.0f)
if(!animate||refresh_time==0.0f)
refresh_time=ImGui::GetTime();
refresh_time=ImGui::GetTime();
while(refresh_time<ImGui::GetTime())// Create dummy data at fixed 60 hz rate for the demo
while(refresh_time<ImGui::GetTime())// Create dummy data at fixed 60 hz rate for the demo
// NB: Transfer ownership of 'ttf_data' to ImFontAtlas, unless font_cfg_template->FontDataOwnedByAtlas == false. Owned TTF buffer will be deleted after Build().
// NB: Transfer ownership of 'ttf_data' to ImFontAtlas, unless font_cfg_template->FontDataOwnedByAtlas == false. Owned TTF buffer will be deleted after Build().