From: Mikko Rasa Date: Sat, 8 Jun 2019 14:34:26 +0000 (+0300) Subject: Allow setting matrix for the beat counter X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=26160b32405b004ecb9ddb5702f877da5881c82c;p=libs%2Fdemoscene.git Allow setting matrix for the beat counter --- diff --git a/source/beatcounter.cpp b/source/beatcounter.cpp index d914c20..2798056 100644 --- a/source/beatcounter.cpp +++ b/source/beatcounter.cpp @@ -9,7 +9,11 @@ BeatCounter::BeatCounter(Resources &resources): instance(text) { text.set_alignment(GL::Text::CENTER); - instance.set_matrix(GL::Matrix::scaling(0.02f)); +} + +void BeatCounter::set_matrix(const GL::Matrix &m) +{ + instance.set_matrix(m); } void BeatCounter::beat(int b) diff --git a/source/beatcounter.h b/source/beatcounter.h index 98af61b..ed0dd27 100644 --- a/source/beatcounter.h +++ b/source/beatcounter.h @@ -20,8 +20,9 @@ private: public: BeatCounter(Resources &); - virtual void validate() const { } + void set_matrix(const Msp::GL::Matrix &); + virtual void validate() const { } virtual void beat(int); virtual void render(Msp::GL::Renderer &, const Msp::GL::Tag &) const;