diff --git a/plugins/Nekobi/DistrhoUINekobi.cpp b/plugins/Nekobi/DistrhoUINekobi.cpp index bda008f..30a0f22 100644 --- a/plugins/Nekobi/DistrhoUINekobi.cpp +++ b/plugins/Nekobi/DistrhoUINekobi.cpp @@ -26,11 +26,11 @@ namespace Art = DistrhoArtworkNekobi; DistrhoUINekobi::DistrhoUINekobi() : UI(Art::backgroundWidth, Art::backgroundHeight), - fImgBackground(Art::backgroundData, Art::backgroundWidth, Art::backgroundHeight, GL_BGR), + fImgBackground(Art::backgroundData, Art::backgroundWidth, Art::backgroundHeight, kImageFormatBGR), fAboutWindow(this) { // about - Image aboutImage(Art::aboutData, Art::aboutWidth, Art::aboutHeight, GL_BGR); + Image aboutImage(Art::aboutData, Art::aboutWidth, Art::aboutHeight, kImageFormatBGR); fAboutWindow.setImage(aboutImage); // slider @@ -171,7 +171,7 @@ void DistrhoUINekobi::imageButtonClicked(ImageButton* button, int) if (button != fButtonAbout) return; - fAboutWindow.exec(); + fAboutWindow.runAsModal(); } void DistrhoUINekobi::imageKnobDragStarted(ImageKnob* knob) @@ -206,8 +206,10 @@ void DistrhoUINekobi::imageSliderValueChanged(ImageSlider* slider, float value) void DistrhoUINekobi::onDisplay() { - fImgBackground.draw(); - fNeko.draw(); + const GraphicsContext& context(getGraphicsContext()); + + fImgBackground.draw(context); + fNeko.draw(context); } // ----------------------------------------------------------------------- diff --git a/plugins/Nekobi/NekoWidget.hpp b/plugins/Nekobi/NekoWidget.hpp index 5f136f7..5dcb72c 100644 --- a/plugins/Nekobi/NekoWidget.hpp +++ b/plugins/Nekobi/NekoWidget.hpp @@ -1,6 +1,6 @@ /* * Neko widget animation - * Copyright (C) 2013-2015 Filipe Coelho + * Copyright (C) 2013-2021 Filipe Coelho * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -21,7 +21,6 @@ #include "DistrhoArtworkNekobi.hpp" #include "Image.hpp" -#include "Widget.hpp" #include // rand @@ -61,7 +60,7 @@ public: } } - void draw() + void draw(const GraphicsContext& context) { int x = fPos+108; int y = -2; @@ -72,7 +71,7 @@ public: y += 12; } - fCurImage->drawAt(x, y); + fCurImage->drawAt(context, x, y); } // returns true if needs repaint