mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-12 02:00:58 +01:00
Misc: allowing override of IM_TABSIZE (#5593)
This commit is contained in:
parent
268565079c
commit
ef6ba0d846
@ -3813,7 +3813,7 @@ static void ShowDemoWindowTables()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// [Method 3] We call TableNextColumn() _before_ each cell. We never call TableNextRow(),
|
// [Method 3] We call TableNextColumn() _before_ each cell. We never call TableNextRow(),
|
||||||
// as TableNextColumn() will automatically wrap around and create new roes as needed.
|
// as TableNextColumn() will automatically wrap around and create new rows as needed.
|
||||||
// This is generally more convenient when your cells all contains the same type of data.
|
// This is generally more convenient when your cells all contains the same type of data.
|
||||||
HelpMarker(
|
HelpMarker(
|
||||||
"Only using TableNextColumn(), which tends to be convenient for tables where every cells contains the same type of contents.\n"
|
"Only using TableNextColumn(), which tends to be convenient for tables where every cells contains the same type of contents.\n"
|
||||||
|
@ -237,7 +237,9 @@ namespace ImStb
|
|||||||
#else
|
#else
|
||||||
#define IM_NEWLINE "\n"
|
#define IM_NEWLINE "\n"
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef IM_TABSIZE // Until we move this to runtime and/or add proper tab support, at least allow users to compile-time override
|
||||||
#define IM_TABSIZE (4)
|
#define IM_TABSIZE (4)
|
||||||
|
#endif
|
||||||
#define IM_MEMALIGN(_OFF,_ALIGN) (((_OFF) + ((_ALIGN) - 1)) & ~((_ALIGN) - 1)) // Memory align e.g. IM_ALIGN(0,4)=0, IM_ALIGN(1,4)=4, IM_ALIGN(4,4)=4, IM_ALIGN(5,4)=8
|
#define IM_MEMALIGN(_OFF,_ALIGN) (((_OFF) + ((_ALIGN) - 1)) & ~((_ALIGN) - 1)) // Memory align e.g. IM_ALIGN(0,4)=0, IM_ALIGN(1,4)=4, IM_ALIGN(4,4)=4, IM_ALIGN(5,4)=8
|
||||||
#define IM_F32_TO_INT8_UNBOUND(_VAL) ((int)((_VAL) * 255.0f + ((_VAL)>=0 ? 0.5f : -0.5f))) // Unsaturated, for display purpose
|
#define IM_F32_TO_INT8_UNBOUND(_VAL) ((int)((_VAL) * 255.0f + ((_VAL)>=0 ? 0.5f : -0.5f))) // Unsaturated, for display purpose
|
||||||
#define IM_F32_TO_INT8_SAT(_VAL) ((int)(ImSaturate(_VAL) * 255.0f + 0.5f)) // Saturated, always output 0..255
|
#define IM_F32_TO_INT8_SAT(_VAL) ((int)(ImSaturate(_VAL) * 255.0f + 0.5f)) // Saturated, always output 0..255
|
||||||
|
Loading…
Reference in New Issue
Block a user