GithubHelp home page GithubHelp logo

Comments (3)

dcnieho avatar dcnieho commented on May 21, 2024

The context for this is that i am trying to implement the splitter from ocornut/imgui#319 (comment)

What i have got now is

def splitter(split_vertically, thickness, size1, size2, min_size1, min_size2, splitter_long_axis_size = -1.0):
    g = imgui.get_current_context()
    window = g.current_window
    id = window.get_id("##Splitter")
    cp = window.dc.cursor_pos
    off= imgui.ImVec2(size1, 0.) if split_vertically else imgui.ImVec2(0., size1)
    sz = imgui.internal.calc_item_size(imgui.ImVec2(thickness, splitter_long_axis_size) if split_vertically else imgui.ImVec2(splitter_long_axis_size, thickness), 0., 0.)
    bb = imgui.internal.ImRect(cp[0]+off[0],cp[1]+off[1], cp[0]+off[0]+sz[0],cp[1]+off[1]+sz[1])
    np_size1 = np.array([size1],dtype='float32')
    np_size2 = np.array([size2],dtype='float32')
    retval = imgui.internal.splitter_behavior(bb, id, imgui.internal.Axis.x if split_vertically else imgui.internal.Axis.y, np_size1, np_size2, min_size1, 4., .04)#min_size2, 4., 0.04)
    return retval, np_size1[0], np_size2[0]

from imgui_bundle.

pthom avatar pthom commented on May 21, 2024

Hi,

Thanks for pointing this out. This was due to a misconfiguration in the generator. It was fixed in d39eca0

The culprit is this option:
https://github.com/pthom/srcmlcpp/blob/main/packages/litgen/options.py#L226-L243

Which is heavily used in ImPlot bindings, as well as some imgui bindings for plotting functions.

from imgui_bundle.

dcnieho avatar dcnieho commented on May 21, 2024

Nice work! Glad that was so easy to fix

from imgui_bundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.