mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-07 13:35:49 +02:00
Merge branch 'master' into docking + tweak dock node padding + use CheckboxFlags with int
# Conflicts: # imgui.cpp # imgui_demo.cpp # imgui_internal.h
This commit is contained in:
@ -350,21 +350,12 @@ void ImGui::StyleColorsLight(ImGuiStyle* dst)
|
||||
|
||||
ImDrawListSharedData::ImDrawListSharedData()
|
||||
{
|
||||
Font = NULL;
|
||||
FontSize = 0.0f;
|
||||
CurveTessellationTol = 0.0f;
|
||||
CircleSegmentMaxError = 0.0f;
|
||||
ClipRectFullscreen = ImVec4(-8192.0f, -8192.0f, +8192.0f, +8192.0f);
|
||||
InitialFlags = ImDrawListFlags_None;
|
||||
|
||||
// Lookup tables
|
||||
memset(this, 0, sizeof(*this));
|
||||
for (int i = 0; i < IM_ARRAYSIZE(ArcFastVtx); i++)
|
||||
{
|
||||
const float a = ((float)i * 2 * IM_PI) / (float)IM_ARRAYSIZE(ArcFastVtx);
|
||||
ArcFastVtx[i] = ImVec2(ImCos(a), ImSin(a));
|
||||
}
|
||||
memset(CircleSegmentCounts, 0, sizeof(CircleSegmentCounts)); // This will be set by SetCircleSegmentMaxError()
|
||||
TexUvLines = NULL;
|
||||
}
|
||||
|
||||
void ImDrawListSharedData::SetCircleSegmentMaxError(float max_error)
|
||||
@ -1435,7 +1426,10 @@ void ImDrawListSplitter::Split(ImDrawList* draw_list, int channels_count)
|
||||
IM_ASSERT(_Current == 0 && _Count <= 1 && "Nested channel splitting is not supported. Please use separate instances of ImDrawListSplitter.");
|
||||
int old_channels_count = _Channels.Size;
|
||||
if (old_channels_count < channels_count)
|
||||
{
|
||||
_Channels.reserve(channels_count); // Avoid over reserving since this is likely to stay stable
|
||||
_Channels.resize(channels_count);
|
||||
}
|
||||
_Count = channels_count;
|
||||
|
||||
// Channels[] (24/32 bytes each) hold storage that we'll swap with draw_list->_CmdBuffer/_IdxBuffer
|
||||
|
Reference in New Issue
Block a user