Live data from Hacker News

Egui – An immediate mode GUI written in Rust

egui.rs

81–90 of 143 posts

Re: Egui – An immediate mode GUI written in Rust

#81

Earlier quoted context omitted.

I summon Google Assistant and press the what's on my screen button, that one usually allows me to select text even when the apps don't.

The layers of extreme complexity in this situation are astounding. The app has some text internally, it renders it by rasterizing fonts to a bitmap, the OS takes the bitmap and composites it within the wider UI. Google Assistant grabs a screenshot of the fully composited, post-processed OS UI, sends it over the internet to a server, which uses an OCR model to read all the text, and a different model to work out which…

On Android it more or less just uses the accessibility APIs to grab the actual text, you can do it without using Google Assistant even by selecting text inside an app's thumbnail window from the Recent Apps screen.

Re: Egui – An immediate mode GUI written in Rust

#82

Earlier quoted context omitted.

You generally can't copy text in native UIs unless the app author goes to extra effort to allow it. It's really the web that is the odd one out here because it was originally intended for documents.

> You generally can't copy text in native UIs You mean mobile apps, right? With desktop UIs this has traditionally never been an issue.

Most desktop apps are games and I can't think of a single game where you can copypaste text.

Re: Egui – An immediate mode GUI written in Rust

#83
post #60

I'm afraid that until browsers provide APIs to help render fonts with sub-pixel rendering (note: that would add fingerprinting bits), canvas-based UI rendering libraries will always have a big disadvantage (vs DOM-based) on all but the high pixel density devices. (This is well known by the egui authors, which is a great library!)

I'm not sure. Phones and Macs are already all high density enough. Apparently it's been removed on Mac. Probably not too long before even cheap windows laptops and Chromebooks have hidpi screens.

Plus modern displays can have all sorts of weird subpixel layouts so it's not as simple as it used to be.

Re: Egui – An immediate mode GUI written in Rust

#84

Demo pages like this are fun, and technically impressive when compiled to a browser environment. But I suffer from a lack of imagination so these widget demos don't really help me envision what an egui-powered app can do or might look like. Does anyone have any examples of fun things that use egui?

I find it really practical to create a quick ui. For example i used to do glitch art with a friend that didn’t know how to use a cli, so i created a gui for him to use [0]. Egui is perfect for this use case, you create quickly lightweights softwares, than can be compiled to many different OS.

[0] https://glitchedfactory.com

Re: Egui – An immediate mode GUI written in Rust

#85
post #71
post #6

Earlier quoted context omitted.

I use it in Sharpview. It's really for GUI programs, not web pages. It redraws everything on every frame, so it's most useful for 2D overlays on 3D game-type programs. For that, it's pretty good. It's one pass. As a result, layouts which are ordered left to right and top to bottom work well, but ones which displace or resize items above or to the left don't work well. Egui tries to fix things up on the next frame, th…

> It redraws everything on every frame, so it's most useful for 2D overlays on 3D game-type programs. So it's not a GUI. In my book a GUI only redraws when something changes, to save the user's power.

If it’s used as a game ui, games typically render everything at 60fps - so the energy cost from ui layer would be neglible.

Afaik nobody is forcing to rerender the ui layer if nothing changes, though. Just render it to a texture and compose … no need to put everything to the same render target?

Re: Egui – An immediate mode GUI written in Rust

#86
post #82

Earlier quoted context omitted.

> You generally can't copy text in native UIs You mean mobile apps, right? With desktop UIs this has traditionally never been an issue.

Most desktop apps are games and I can't think of a single game where you can copypaste text.

Counter Strike 2

Re: Egui – An immediate mode GUI written in Rust

#87

Am I the only one that has a problem with all non dom/html renderers that I can't copy the text on mobile? The same with flutter etc, it's such a regression in my eyes but nobody prioritizes it.

The crux of the issue and it's the argument I always reach for when someone on HN says HTML is the worst UI scheme we have. It's the best, being text first and equipped with a heavy focus on accessibility.

Re: Egui – An immediate mode GUI written in Rust

#88

Demo pages like this are fun, and technically impressive when compiled to a browser environment. But I suffer from a lack of imagination so these widget demos don't really help me envision what an egui-powered app can do or might look like. Does anyone have any examples of fun things that use egui?

I use egui to draw the overlay UI for game hacks I write. It's easy to use.

Re: Egui – An immediate mode GUI written in Rust

#89

Earlier quoted context omitted.

> worse/impossible adblocking Obviously that's not a downside from a software developer perspective.

I’m a software developer, and it seems like a positive to me? Why wouldn’t you want the ability to post-facto manipulate with script the interfaces you are presented with?

As long as someone else is paying the bills.

Re: Egui – An immediate mode GUI written in Rust

#90

Earlier quoted context omitted.

I summon Google Assistant and press the what's on my screen button, that one usually allows me to select text even when the apps don't.

The layers of extreme complexity in this situation are astounding. The app has some text internally, it renders it by rasterizing fonts to a bitmap, the OS takes the bitmap and composites it within the wider UI. Google Assistant grabs a screenshot of the fully composited, post-processed OS UI, sends it over the internet to a server, which uses an OCR model to read all the text, and a different model to work out which…

I used to be upset at such absurdities. Now I try to appreciate what a relatively universal interface images are instead! :D It doesn’t matter how text gets drawn if we OCR it. (Though I feel better when we do so on device.)
Post reply on HN