HackerTrans
TopNewTrendsCommentsPastAskShowJobs

goodpaul6

no profile record

comments

goodpaul6
·2 yıl önce·discuss
I don’t think it’s trying to have some magical hook, it just feels better to program than C/C++ for most of their use cases.

That being said, I find the error handling via multiple return values + or_return pretty nifty, and the vendored libraries give it a very “batteries-included” feel.

For example, you can render hardware accelerated graphics and de/serialize JSON without downloading any packages.
goodpaul6
·2 yıl önce·discuss
It looks like they only repaint when there is interaction as well (so it does sleep while nothing is happening).

However, my point with linking this library was just to demonstrate that accessibility and IMGUI are not inherently incompatible.

My point with the example I created above was that you don't have to trade away battery life in order to take advantage of the IMGUI paradigm. My secondary point was also to implement the "interactive rectangles" optimization I mentioned above (which only took a few lines of code).

While I agree with you that there are definitely tradeoffs, I don't think the aforementioned ones are necessary.
goodpaul6
·2 yıl önce·discuss
Here's an IMGUI library that's also accessible (via AccessKit): https://github.com/emilk/egui
goodpaul6
·2 yıl önce·discuss
I decided to implement it (IMGUI that only repaints when relevant interactions occur) so that my point comes across more clearly:

https://github.com/goodpaul6/imgui-power-saving-example

Of course this is a greatly simplified example, but I can see this extending to any GUI widget that can be represented with a (hierarchy) of rectangles.
goodpaul6
·2 yıl önce·discuss
I'm not sure the perf/battery life tradeoff is a necessary aspect of immediate mode UI.

  while (running) {
    event := get_next_event()
    process_event(event)
    repaint()
  }
You could just have get_next_event block until there is a meaningful event that occurs (e.g. mouse click). You could even have your UI report "interactive" rectangles to the event layer to prevent it from producing e.g. mouse move events that are irrelevant.

IMGUI is just a different API design IMO.