natinusala / borealis

Hardware accelerated, controller and TV oriented UI library for PC and Nintendo Switch (libnx)
Apache License 2.0
260 stars 83 forks source link

New Class: Progress bar as dialog popup #39

Closed nadrino closed 3 years ago

nadrino commented 4 years ago

Hello there :)

I've been working with borealis to build a GUI for SMM, and I would like to add a progress bar layout while the program is executing something (std::async). I tried different things but it seems I can't use brls::Dialog as a class template to do this. So I was wondering maybe this could be interesting to have a kind of template to display anything (like a progress bar) in the style of brls::Dialog::open().

But if you have a better idea to display a popup progress bar (a bit like tinfoil for example) with what's already existing, it would be great too!

Cheers

HookedBehemoth commented 4 years ago

On my project I have a small progress bar for uploads that I put as the content view in a brls::Dialog: https://github.com/HookedBehemoth/ShareNX/blob/brls/applet/elements/upload_process.hpp https://github.com/HookedBehemoth/ShareNX/blob/brls/applet/elements/upload_process.cpp

If you want to use that for inspiration feel free.

nadrino commented 4 years ago

Thanks man! I'm gonna try that :)

natinusala commented 4 years ago

The Dialog class is generic and is meant to put anything in the dialog frame.

If you want to extend the library and add a ProgressDialog class that allows to easily create a modal loading (like the one in system HOS updates), feel free to PR it :)

natinusala commented 3 years ago

Duplicated by #103