Giter Club home page Giter Club logo

Comments (6)

bvssvni avatar bvssvni commented on August 20, 2024

@TyOverby is working on an implementation of this in Rust https://github.com/TyOverby/Rust-IUI/

from conrod.

mitchmindtree avatar mitchmindtree commented on August 20, 2024

Just watched the mollyrocket vid - super cool!

I did a PR recently with a more classical/imperative style widget system just to get things kicked off with Conrod, but I'd be more than happy to see the direction go more along the lines of Ty's and the immediate mode style :-)

from conrod.

mitchmindtree avatar mitchmindtree commented on August 20, 2024

Some interesting discussion of pros and cons here: http://gamedev.stackexchange.com/questions/24103/immediate-gui-yae-or-nay

from conrod.

mitchmindtree avatar mitchmindtree commented on August 20, 2024

Some more thoughts:

I'm finding myself struggling to reason about how some of the more complex widgets would work in a practical sense - particularly text-boxes and other widgets that can have much more complex widget states than just Active / Highlighted / Normal for example (like cursor position, text highlighting, etc). All of this state would still have to be stored somewhere (in the UIContext i'm guessing?).

The discussion between immediate and retained seems to largely revolve around where the widget state is stored ("retained" seems to focus on widget structs where "immediate" seems to focus on the UIContext).

How would we get the interactive events (MousePress, MouseMove, etc) into the render loop to be considered by the draw_widget functions so that they can update their state in the UIContext? I'm guessing we could constantly store current mouse/keyboard/controller state in the UIContext to get around this?

In the mollyrocket vid he seems to suggest that there is only ever one active widget at any time (correct me if I'm wrong). Maybe it would be useful to avoid this mindset if we can in case we hope to support multi-touch devices in the future where for example a user might want to move multiple sliders at once? I don't think this should be too tricky to work around though.

Will this style really be more beneficial and elegant as opposed to the classical retained style? I love the idea of not having UI segmented across an "init" section and a "callback" section, though it seems that in trying to solve this with immediate-mode, we just end up with the segmentation being across the UIContext and render-loop instead?

I'm still really keen to see an immediate-mode UI work, though I have a feeling developing this library will take quite a lot of thought to get right. This could just be because I'm so much more familiar with the retained style though :-) I'm going to have a play around with an immediate-mode version of the widget system today and see how it feels :-)

from conrod.

bvssvni avatar bvssvni commented on August 20, 2024

The case with multi touch is important. Storing state inside the widget that you don't care about is a good thing. Usually the appearance does not matter for the event logic, so you want to declare this upfront.

from conrod.

indiv0 avatar indiv0 commented on August 20, 2024

A C/C++ implementation:

https://github.com/ocornut/imgui

from conrod.

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.