Skip to content

Commit

Permalink
Update imgui_node_editor ([ADAPT_IMGUI_BUNDLE]: Add ForceWindowConten…
Browse files Browse the repository at this point in the history
…tWidthToNodeWidth)
  • Loading branch information
pthom committed Jun 23, 2024
1 parent 8407fbb commit 0ed5e8c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions bindings/imgui_bundle/imgui_node_editor.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,15 @@ class Config:
# float SmoothZoomPower; /* original C++ signature */
smooth_zoom_power: float

# bool ForceWindowContentWidthToNodeWidth; /* original C++ signature */
# [ADAPT_IMGUI_BUNDLE]
#
# By default, ImGui::TextWrapped() and ImGui::Separator(), and ImGui::SliderXXX
# will not work in a Node because they will not respect the node's bounds.
# Instead, they will use the width of the whole window.
# Set ForceWindowContentWidthToNodeWidth to True to fix this (this is disabled by default).
force_window_content_width_to_node_width: bool

# Config() /* original C++ signature */
# : SettingsFile("NodeEditor.json")
# , BeginSaveSession(nullptr)
Expand All @@ -187,6 +196,7 @@ class Config:
# # else
# , SmoothZoomPower(1.3f)
# # endif
# , ForceWindowContentWidthToNodeWidth(false)
# {
# }
def __init__(self) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ void py_init_module_imgui_node_editor(py::module& m)
.def_readwrite("context_menu_button_index", &ax::NodeEditor::Config::ContextMenuButtonIndex, "Mouse button index context menu action will react to (0-left, 1-right, 2-middle)")
.def_readwrite("enable_smooth_zoom", &ax::NodeEditor::Config::EnableSmoothZoom, "")
.def_readwrite("smooth_zoom_power", &ax::NodeEditor::Config::SmoothZoomPower, "")
.def_readwrite("force_window_content_width_to_node_width", &ax::NodeEditor::Config::ForceWindowContentWidthToNodeWidth, " [ADAPT_IMGUI_BUNDLE]\n\n By default, ImGui::TextWrapped() and ImGui::Separator(), and ImGui::SliderXXX\n will not work in a Node because they will not respect the node's bounds.\n Instead, they will use the width of the whole window.\n Set ForceWindowContentWidthToNodeWidth to True to fix this (this is disabled by default).")
.def(py::init<>())
;

Expand Down
2 changes: 1 addition & 1 deletion external/imgui-node-editor/imgui-node-editor

0 comments on commit 0ed5e8c

Please sign in to comment.