From 26160b32405b004ecb9ddb5702f877da5881c82c Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 8 Jun 2019 17:34:26 +0300 Subject: [PATCH] Allow setting matrix for the beat counter --- source/beatcounter.cpp | 6 +++++- source/beatcounter.h | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) 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; -- 2.45.2