Add Push/PopTextAlignment function

This commit is contained in:
Webster Sheets
2021-06-20 22:14:12 -04:00
committed by Drezil
parent c6e0284ac5
commit d07649b7b4
3 changed files with 21 additions and 0 deletions

View File

@ -2296,8 +2296,11 @@ struct IMGUI_API ImGuiWindowTempData
// We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings.
float ItemWidth; // Current item width (>0.0: width in pixels, <0.0: align xx pixels to the right of window).
float TextWrapPos; // Current text wrap pos.
float TextAlignment; // Current text alignment.
ImVector<float> ItemWidthStack; // Store item widths to restore (attention: .back() is not == ItemWidth)
ImVector<float> TextWrapPosStack; // Store text wrap pos to restore (attention: .back() is not == TextWrapPos)
ImVector<float> TextAlignmentStack; // Store text alignment to restore (attention: .back() is not == TextAlignment)
ImGuiStackSizes StackSizesOnBegin; // Store size of various stacks for asserting
};
// Storage for one window