Fixed multiple compiler warnings related to virtual functions.

This commit is contained in:
Leon Styhre 2021-09-18 11:49:39 +02:00
parent 0b6d987263
commit c7d815a125
9 changed files with 19 additions and 17 deletions

View file

@ -81,7 +81,7 @@ void MediaViewer::update(int deltaTime)
mVideo->update(deltaTime);
}
void MediaViewer::render()
void MediaViewer::render(const glm::mat4& /*parentTrans*/)
{
glm::mat4 trans{Renderer::getIdentity()};
Renderer::setMatrix(trans);

View file

@ -20,11 +20,11 @@ public:
MediaViewer(Window* window);
virtual ~MediaViewer();
virtual bool startMediaViewer(FileData* game);
virtual void stopMediaViewer();
virtual bool startMediaViewer(FileData* game) override;
virtual void stopMediaViewer() override;
virtual void update(int deltaTime);
virtual void render();
virtual void update(int deltaTime) override;
virtual void render(const glm::mat4& parentTrans) override;
private:
void initiateViewer();
@ -33,8 +33,8 @@ private:
void playVideo();
void showImage(int index);
virtual void showNext();
virtual void showPrevious();
virtual void showNext() override;
virtual void showPrevious() override;
Window* mWindow;
FileData* mGame;

View file

@ -220,7 +220,7 @@ void GuiLaunchScreen::update(int deltaTime)
mScaleUp = glm::clamp(mScaleUp + 0.07f, 0.0f, 1.0f);
}
void GuiLaunchScreen::render()
void GuiLaunchScreen::render(const glm::mat4& /*parentTrans*/)
{
// Scale up animation.
if (mScaleUp < 1.0f)

View file

@ -30,7 +30,7 @@ public:
void onSizeChanged() override;
virtual void update(int deltaTime) override;
virtual void render() override;
virtual void render(const glm::mat4& parentTrans) override;
private:
Window* mWindow;

View file

@ -561,10 +561,10 @@ void Window::render()
}
if (mRenderMediaViewer)
mMediaViewer->render();
mMediaViewer->render(trans);
if (mRenderLaunchScreen)
mLaunchScreen->render();
mLaunchScreen->render(trans);
if (Settings::getInstance()->getBool("DisplayGPUStatistics") && mFrameDataText) {
Renderer::setMatrix(Renderer::getIdentity());

View file

@ -61,7 +61,7 @@ public:
virtual void showPrevious() = 0;
virtual void update(int deltaTime) = 0;
virtual void render() = 0;
virtual void render(const glm::mat4& parentTrans) = 0;
};
class GuiLaunchScreen
@ -70,7 +70,7 @@ public:
virtual void displayLaunchScreen(FileData* game) = 0;
virtual void closeLaunchScreen() = 0;
virtual void update(int deltaTime) = 0;
virtual void render() = 0;
virtual void render(const glm::mat4& parentTrans) = 0;
};
class InfoPopup

View file

@ -110,8 +110,6 @@ void SliderComponent::setValue(float value)
onValueChanged();
}
float SliderComponent::getValue() { return mValue; }
void SliderComponent::onSizeChanged()
{
if (!mSuffix.empty())

View file

@ -19,13 +19,16 @@ class TextCache;
class SliderComponent : public GuiComponent
{
public:
using GuiComponent::getValue;
using GuiComponent::setValue;
// Minimum value (far left of the slider), maximum value (far right of the slider),
// increment size (how much pressing L/R moves by), unit to display (optional).
SliderComponent(
Window* window, float min, float max, float increment, const std::string& suffix = "");
void setValue(float val);
float getValue();
void setValue(float value);
float getValue() { return mValue; }
bool input(InputConfig* config, Input input) override;
void update(int deltaTime) override;

View file

@ -42,6 +42,7 @@ public:
using IList<TextListData, T>::size;
using IList<TextListData, T>::isScrolling;
using IList<TextListData, T>::stopScrolling;
using GuiComponent::setColor;
TextListComponent(Window* window);