mirror of
https://github.com/clangen/musikcube.git
synced 2024-12-29 18:14:16 +00:00
Added an error dialog if no visualizers are installed.
This commit is contained in:
parent
0f7a5a20b5
commit
f79daccb1e
@ -41,15 +41,35 @@
|
||||
#include <cursespp/App.h>
|
||||
#include <cursespp/SimpleScrollAdapter.h>
|
||||
#include <cursespp/ListOverlay.h>
|
||||
#include <cursespp/DialogOverlay.h>
|
||||
|
||||
using namespace musik::box;
|
||||
using namespace musik::core::audio;
|
||||
using namespace cursespp;
|
||||
|
||||
static void showNoVisualizersMessage() {
|
||||
std::shared_ptr<DialogOverlay> dialog(new DialogOverlay());
|
||||
|
||||
(*dialog)
|
||||
.SetTitle("musikbox")
|
||||
.SetMessage("no visualizers found!")
|
||||
.AddButton(
|
||||
"KEY_ENTER",
|
||||
"ENTER",
|
||||
"ok");
|
||||
|
||||
App::Overlays().Push(dialog);
|
||||
}
|
||||
|
||||
VisualizerOverlay::VisualizerOverlay() {
|
||||
}
|
||||
|
||||
void VisualizerOverlay::Show() {
|
||||
if (!vis::VisualizerCount()) {
|
||||
showNoVisualizersMessage();
|
||||
return;
|
||||
}
|
||||
|
||||
using Adapter = cursespp::SimpleScrollAdapter;
|
||||
using ListOverlay = cursespp::ListOverlay;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user