sand_node.py 557 B

12345678910111213141516171819202122232425
  1. from imgui_bundle import immapp, imgui_node_editor as ed, ImVec4
  2. def gui():
  3. ed.begin("Nodes")
  4. ed.push_style_var(ed.StyleVar.node_padding, ImVec4(1, 1, 1, 1))
  5. ed.pop_style_var()
  6. style = ed.get_style()
  7. style.node_padding = ImVec4(8, 8, 8, 8)
  8. ed.push_style_color(ed.StyleColor.node_bg, ImVec4(0.2, 0.2, 0.2, 1.0))
  9. ed.get_style().set_color_(ed.StyleColor.node_bg, ImVec4(0.2, 0.2, 0.2, 1.0))
  10. # ed.get_style().col
  11. ed.end()
  12. def main():
  13. immapp.run(gui, with_node_editor=True)
  14. if __name__ == "__main__":
  15. main()