Internals: Added BeginDragDropTooltip() internal function to convey semantic (drag and drop tooltip doesn't get clipped within display boundaries). Revert part of 3218666fb9. (#1739, #143).
@ -163,7 +163,7 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
- tooltip: drag and drop with tooltip near monitor edges lose/changes its last direction instead of locking one. The drag and drop tooltip should always follow without changing direction.
- tooltip: drag and drop with tooltip near monitor edges lose/changes its last direction instead of locking one. The drag and drop tooltip should always follow without changing direction.
- tooltip: tooltip that doesn't fit in entire screen seems to lose their "last preferred direction" and may teleport when moving mouse.
- tooltip: tooltip that doesn't fit in entire screen seems to lose their "last preferred direction" and may teleport when moving mouse.
- tooltip: allow to set the width of a tooltip to allow TextWrapped() etc. while keeping the height automatic.
- tooltip: allow to set the width of a tooltip to allow TextWrapped() etc. while keeping the height automatic.
- tooltip: allow tooltips with timers? or general timer policy? (instantaneous vs timed)
- tooltip: tooltips with delay timers? or general timer policy? (instantaneous vs timed) (#1485)
- menus: calling BeginMenu() twice with a same name doesn't append as Begin() does for regular windows (#1207)
- menus: calling BeginMenu() twice with a same name doesn't append as Begin() does for regular windows (#1207)
- menus: menu bars inside modals windows are acting weird.
- menus: menu bars inside modals windows are acting weird.
@ -215,7 +215,6 @@ It's mostly a bunch of personal notes, probably incomplete. Feel free to query i
// Discard the drag if have not called SetDragDropPayload()
// Discard the drag if have not called SetDragDropPayload()
if(g.DragDropPayload.DataFrameCount==-1)
if(g.DragDropPayload.DataFrameCount==-1)
ClearDragDrop();
ClearDragDrop();
}
}
voidImGui::BeginDragDropTooltip()
{
// The default tooltip position is a little offset to give space to see the context menu (it's also clamped within the current viewport/monitor)
// In the context of a dragging tooltip we try to reduce that offset and we enforce following the cursor.
// Whatever we do we want to call SetNextWindowPos() to enforce a tooltip position and disable clipping the tooltip without our display area, like regular tooltip do.
//PushStyleVar(ImGuiStyleVar_Alpha, g.Style.Alpha * 0.60f); // This would be nice but e.g ColorButton with checkboard has issue with transparent colors :(
BeginTooltipEx(0,true);
}
voidImGui::EndDragDropTooltip()
{
EndTooltip();
}
// Use 'cond' to choose to submit payload on drag start or every frame
// Use 'cond' to choose to submit payload on drag start or every frame
IMGUI_APIvoidBeginColumns(constchar*str_id,intcount,ImGuiColumnsFlagsflags=0);// setup number of columns. use an identifier to distinguish multiple column sets. close with EndColumns().
IMGUI_APIvoidBeginColumns(constchar*str_id,intcount,ImGuiColumnsFlagsflags=0);// setup number of columns. use an identifier to distinguish multiple column sets. close with EndColumns().