eugeneloza/decoherence

Use CastleProgress

Opened this issue · 3 comments

Note that applications using TCastleWindow should usually not need to deal with TCastleProgressBar class directly. Instead you only use https://castle-engine.io/apidoc/html/CastleWindowProgress.html , and then everything using Progress.Init/Step/Fini (internal CGE stuff as well as your own) will have progress bar rendered.

Direct TCastleProgressBar usage is only necessary in case of TCastleControl... and I would prefer to eliminate it some day :), implementing something like CastleControlProgress that mimics CastleWindowProgress but works on TCastleControl. Or maybe even something like CastleContainerProgress that works on TUIContainer, and thus can be used with both TCastleWindow and TCastleControl.

Sure, I'll route the output to DecoProgressBar :) It's I've just realized that I don't have to reinvent the wheel to monitor progress during the load/generation process.

Ah, OK:)

In that case you can implement your own descendant of TProgressUserInterface , like https://castle-engine.io/apidoc/html/CastleWindowProgress.TWindowProgressInterface.html . This approach allows to use your own progress bar UI with CGE progress reporting:)