mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Internals: Menus: minor tidying up + renaming in ImGuiMenuColumns + removing extraneous offset field which is always zero + using smaller types.
sizeof() 36 -> 20
This commit is contained in:
@ -1035,14 +1035,15 @@ struct IMGUI_API ImGuiGroupData
|
||||
// Simple column measurement, currently used for MenuItem() only.. This is very short-sighted/throw-away code and NOT a generic helper.
|
||||
struct IMGUI_API ImGuiMenuColumns
|
||||
{
|
||||
float Spacing;
|
||||
float Width, NextWidth;
|
||||
float Pos[3], NextWidths[3];
|
||||
ImU32 TotalWidth;
|
||||
ImU32 NextTotalWidth;
|
||||
ImU16 Spacing;
|
||||
ImU16 Offsets[2]; // Offset of: Shortcut, Check mark (locked in Update)
|
||||
ImU16 Widths[3]; // Width of: Label, Shortcut, Check mark (accumulator for current frame)
|
||||
|
||||
ImGuiMenuColumns() { memset(this, 0, sizeof(*this)); }
|
||||
void Update(int count, float spacing, bool clear);
|
||||
float DeclColumns(float w0, float w1, float w2);
|
||||
float CalcExtraSpace(float avail_w) const;
|
||||
void Update(float spacing, bool window_reappearing);
|
||||
float DeclColumns(float w_label, float w_shortcut, float w_checkmark);
|
||||
};
|
||||
|
||||
// Internal state of the currently focused/edited text input box
|
||||
|
Reference in New Issue
Block a user