Removed a lot of unnecessary combinations of the virtual and override keywords.

This commit is contained in:
Leon Styhre 2022-01-18 17:40:47 +01:00
parent ec0a7ad2f1
commit dfeddebc66
33 changed files with 143 additions and 149 deletions

View file

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

View file

@ -24,8 +24,8 @@ private:
void updateMenu(const std::string& systemName, const std::string& label, bool defaultEmulator); void updateMenu(const std::string& systemName, const std::string& label, bool defaultEmulator);
void selectorWindow(SystemData* system); void selectorWindow(SystemData* system);
virtual bool input(InputConfig* config, Input input) override; bool input(InputConfig* config, Input input) override;
virtual std::vector<HelpPrompt> getHelpPrompts() override; std::vector<HelpPrompt> getHelpPrompts() override;
HelpStyle getHelpStyle() override; HelpStyle getHelpStyle() override;
MenuComponent mMenu; MenuComponent mMenu;

View file

@ -29,7 +29,7 @@ public:
bool input(InputConfig* config, Input input) override; bool input(InputConfig* config, Input input) override;
virtual std::vector<HelpPrompt> getHelpPrompts() override; std::vector<HelpPrompt> getHelpPrompts() override;
HelpStyle getHelpStyle() override; HelpStyle getHelpStyle() override;
private: private:

View file

@ -28,9 +28,9 @@ public:
GuiGamelistOptions(Window* window, SystemData* system); GuiGamelistOptions(Window* window, SystemData* system);
virtual ~GuiGamelistOptions(); virtual ~GuiGamelistOptions();
virtual bool input(InputConfig* config, Input input) override; bool input(InputConfig* config, Input input) override;
virtual std::vector<HelpPrompt> getHelpPrompts() override; std::vector<HelpPrompt> getHelpPrompts() override;
virtual HelpStyle getHelpStyle() override; HelpStyle getHelpStyle() override;
private: private:
void openGamelistFilter(); void openGamelistFilter();

View file

@ -24,13 +24,13 @@ public:
GuiLaunchScreen(); GuiLaunchScreen();
virtual ~GuiLaunchScreen(); virtual ~GuiLaunchScreen();
virtual void displayLaunchScreen(FileData* game) override; void displayLaunchScreen(FileData* game) override;
virtual void closeLaunchScreen() override; void closeLaunchScreen() override;
void onSizeChanged() override; void onSizeChanged() override;
virtual void update(int deltaTime) override; void update(int deltaTime) override;
virtual void render(const glm::mat4& parentTrans) override; void render(const glm::mat4& parentTrans) override;
private: private:
Window* mWindow; Window* mWindow;

View file

@ -37,7 +37,7 @@ public:
bool input(InputConfig* config, Input input) override; bool input(InputConfig* config, Input input) override;
void onSizeChanged() override; void onSizeChanged() override;
virtual std::vector<HelpPrompt> getHelpPrompts() override; std::vector<HelpPrompt> getHelpPrompts() override;
HelpStyle getHelpStyle() override; HelpStyle getHelpStyle() override;
private: private:

View file

@ -29,7 +29,7 @@ private:
void onSizeChanged() override; void onSizeChanged() override;
void update(int deltaTime) override; void update(int deltaTime) override;
virtual std::vector<HelpPrompt> getHelpPrompts() override; std::vector<HelpPrompt> getHelpPrompts() override;
HelpStyle getHelpStyle() override; HelpStyle getHelpStyle() override;
std::queue<FileData*> mGameQueue; std::queue<FileData*> mGameQueue;

View file

@ -29,7 +29,7 @@ public:
bool input(InputConfig* config, Input input) override; bool input(InputConfig* config, Input input) override;
void update(int deltaTime) override; void update(int deltaTime) override;
virtual std::vector<HelpPrompt> getHelpPrompts() override; std::vector<HelpPrompt> getHelpPrompts() override;
HelpStyle getHelpStyle() override; HelpStyle getHelpStyle() override;
private: private:

View file

@ -109,7 +109,7 @@ class ScraperHttpRequest : public ScraperRequest
{ {
public: public:
ScraperHttpRequest(std::vector<ScraperSearchResult>& resultsWrite, const std::string& url); ScraperHttpRequest(std::vector<ScraperSearchResult>& resultsWrite, const std::string& url);
virtual void update() override; void update() override;
protected: protected:
virtual void process(const std::unique_ptr<HttpReq>& req, virtual void process(const std::unique_ptr<HttpReq>& req,

View file

@ -57,8 +57,8 @@ public:
SystemView(Window* window); SystemView(Window* window);
~SystemView(); ~SystemView();
virtual void onShow() override { mShowing = true; } void onShow() override { mShowing = true; }
virtual void onHide() override { mShowing = false; } void onHide() override { mShowing = false; }
void goToSystem(SystemData* system, bool animate); void goToSystem(SystemData* system, bool animate);
@ -69,13 +69,13 @@ public:
void onThemeChanged(const std::shared_ptr<ThemeData>& theme); void onThemeChanged(const std::shared_ptr<ThemeData>& theme);
std::vector<HelpPrompt> getHelpPrompts() override; std::vector<HelpPrompt> getHelpPrompts() override;
virtual HelpStyle getHelpStyle() override; HelpStyle getHelpStyle() override;
CarouselType getCarouselType() { return mCarousel.type; } CarouselType getCarouselType() { return mCarousel.type; }
protected: protected:
void onCursorChanged(const CursorState& state) override; void onCursorChanged(const CursorState& state) override;
virtual void onScroll() override void onScroll() override
{ {
NavigationSounds::getInstance().playThemeNavigationSound(SYSTEMBROWSESOUND); NavigationSounds::getInstance().playThemeNavigationSound(SYSTEMBROWSESOUND);
} }

View file

@ -18,39 +18,36 @@ public:
BasicGamelistView(Window* window, FileData* root); BasicGamelistView(Window* window, FileData* root);
// Called when a FileData* is added, has its metadata changed, or is removed. // Called when a FileData* is added, has its metadata changed, or is removed.
virtual void onFileChanged(FileData* file, bool reloadGamelist) override; void onFileChanged(FileData* file, bool reloadGamelist) override;
virtual void onThemeChanged(const std::shared_ptr<ThemeData>& theme) override; void onThemeChanged(const std::shared_ptr<ThemeData>& theme) override;
virtual void setCursor(FileData* cursor) override; void setCursor(FileData* cursor) override;
virtual FileData* getCursor() override { return mList.getSelected(); } FileData* getCursor() override { return mList.getSelected(); }
virtual FileData* getNextEntry() override { return mList.getNext(); } FileData* getNextEntry() override { return mList.getNext(); }
virtual FileData* getPreviousEntry() override { return mList.getPrevious(); } FileData* getPreviousEntry() override { return mList.getPrevious(); }
virtual FileData* getFirstEntry() override { return mList.getFirst(); } FileData* getFirstEntry() override { return mList.getFirst(); }
virtual FileData* getLastEntry() override { return mList.getLast(); } FileData* getLastEntry() override { return mList.getLast(); }
virtual FileData* getFirstGameEntry() override { return mFirstGameEntry; } FileData* getFirstGameEntry() override { return mFirstGameEntry; }
virtual std::string getName() const override { return "basic"; } std::string getName() const override { return "basic"; }
virtual std::vector<HelpPrompt> getHelpPrompts() override; std::vector<HelpPrompt> getHelpPrompts() override;
virtual bool isListScrolling() override { return mList.isScrolling(); } bool isListScrolling() override { return mList.isScrolling(); }
virtual void stopListScrolling() override { mList.stopScrolling(); } void stopListScrolling() override { mList.stopScrolling(); }
virtual const std::vector<std::string>& getFirstLetterIndex() override const std::vector<std::string>& getFirstLetterIndex() override { return mFirstLetterIndex; }
{
return mFirstLetterIndex;
}
virtual void addPlaceholder(FileData* firstEntry = nullptr) override; void addPlaceholder(FileData* firstEntry = nullptr) override;
virtual void launch(FileData* game) override; void launch(FileData* game) override;
protected: protected:
virtual std::string getQuickSystemSelectRightButton() override { return "right"; } std::string getQuickSystemSelectRightButton() override { return "right"; }
virtual std::string getQuickSystemSelectLeftButton() override { return "left"; } std::string getQuickSystemSelectLeftButton() override { return "left"; }
virtual void populateList(const std::vector<FileData*>& files, FileData* firstEntry) override; void populateList(const std::vector<FileData*>& files, FileData* firstEntry) override;
virtual void remove(FileData* game, bool deleteFile) override; void remove(FileData* game, bool deleteFile) override;
virtual void removeMedia(FileData* game) override; void removeMedia(FileData* game) override;
TextListComponent<FileData*> mList; TextListComponent<FileData*> mList;
// Points to the first game in the list, i.e. the first entry which is of the type 'GAME'. // Points to the first game in the list, i.e. the first entry which is of the type 'GAME'.

View file

@ -20,15 +20,15 @@ class DetailedGamelistView : public BasicGamelistView
public: public:
DetailedGamelistView(Window* window, FileData* root); DetailedGamelistView(Window* window, FileData* root);
virtual void onShow() override; void onShow() override;
virtual void onThemeChanged(const std::shared_ptr<ThemeData>& theme) override; void onThemeChanged(const std::shared_ptr<ThemeData>& theme) override;
virtual std::string getName() const override { return "detailed"; } std::string getName() const override { return "detailed"; }
virtual void launch(FileData* game) override; void launch(FileData* game) override;
virtual void preloadGamelist() override { updateInfoPanel(); } void preloadGamelist() override { updateInfoPanel(); }
protected: protected:
virtual void update(int deltaTime) override; void update(int deltaTime) override;
private: private:
void updateInfoPanel(); void updateInfoPanel();

View file

@ -24,47 +24,44 @@ public:
virtual ~GridGamelistView() {} virtual ~GridGamelistView() {}
// Called when a FileData* is added, has its metadata changed, or is removed. // Called when a FileData* is added, has its metadata changed, or is removed.
virtual void onFileChanged(FileData* file, bool reloadGamelist) override; void onFileChanged(FileData* file, bool reloadGamelist) override;
virtual void onShow() override; void onShow() override;
virtual void onThemeChanged(const std::shared_ptr<ThemeData>& theme) override; void onThemeChanged(const std::shared_ptr<ThemeData>& theme) override;
virtual void setCursor(FileData* cursor) override; void setCursor(FileData* cursor) override;
virtual FileData* getCursor() override { return mGrid.getSelected(); } FileData* getCursor() override { return mGrid.getSelected(); }
virtual FileData* getNextEntry() override { return mGrid.getNext(); } FileData* getNextEntry() override { return mGrid.getNext(); }
virtual FileData* getPreviousEntry() override { return mGrid.getPrevious(); } FileData* getPreviousEntry() override { return mGrid.getPrevious(); }
virtual FileData* getFirstEntry() override { return mGrid.getFirst(); } FileData* getFirstEntry() override { return mGrid.getFirst(); }
virtual FileData* getLastEntry() override { return mGrid.getLast(); } FileData* getLastEntry() override { return mGrid.getLast(); }
virtual FileData* getFirstGameEntry() override { return firstGameEntry; } FileData* getFirstGameEntry() override { return firstGameEntry; }
virtual std::string getName() const override { return "grid"; } std::string getName() const override { return "grid"; }
virtual bool input(InputConfig* config, Input input) override; bool input(InputConfig* config, Input input) override;
virtual std::vector<HelpPrompt> getHelpPrompts() override; std::vector<HelpPrompt> getHelpPrompts() override;
virtual void launch(FileData* game) override; void launch(FileData* game) override;
virtual bool isListScrolling() override { return mGrid.isScrolling(); } bool isListScrolling() override { return mGrid.isScrolling(); }
virtual void stopListScrolling() override void stopListScrolling() override
{ {
mGrid.stopAllAnimations(); mGrid.stopAllAnimations();
mGrid.stopScrolling(); mGrid.stopScrolling();
} }
virtual const std::vector<std::string>& getFirstLetterIndex() override const std::vector<std::string>& getFirstLetterIndex() override { return mFirstLetterIndex; }
{
return mFirstLetterIndex;
}
virtual void addPlaceholder(FileData* firstEntry = nullptr) override; void addPlaceholder(FileData* firstEntry = nullptr) override;
protected: protected:
virtual std::string getQuickSystemSelectRightButton() override { return "rightshoulder"; } std::string getQuickSystemSelectRightButton() override { return "rightshoulder"; }
virtual std::string getQuickSystemSelectLeftButton() override { return "leftshoulder"; } std::string getQuickSystemSelectLeftButton() override { return "leftshoulder"; }
virtual void populateList(const std::vector<FileData*>& files, FileData* firstEntry) override; void populateList(const std::vector<FileData*>& files, FileData* firstEntry) override;
virtual void remove(FileData* game, bool deleteFile) override; void remove(FileData* game, bool deleteFile) override;
virtual void removeMedia(FileData* game) override; void removeMedia(FileData* game) override;
virtual void update(int deltaTime) override; void update(int deltaTime) override;
ImageGridComponent<FileData*> mGrid; ImageGridComponent<FileData*> mGrid;
// Points to the first game in the list, i.e. the first entry which is of the type 'GAME'. // Points to the first game in the list, i.e. the first entry which is of the type 'GAME'.

View file

@ -47,14 +47,14 @@ public:
virtual void copyCursorHistory(std::vector<FileData*>& cursorHistory) = 0; virtual void copyCursorHistory(std::vector<FileData*>& cursorHistory) = 0;
virtual void populateCursorHistory(std::vector<FileData*>& cursorHistory) = 0; virtual void populateCursorHistory(std::vector<FileData*>& cursorHistory) = 0;
virtual bool input(InputConfig* config, Input input) override; bool input(InputConfig* config, Input input) override;
virtual void remove(FileData* game, bool deleteFile) = 0; virtual void remove(FileData* game, bool deleteFile) = 0;
virtual void removeMedia(FileData* game) = 0; virtual void removeMedia(FileData* game) = 0;
virtual std::string getName() const = 0; virtual std::string getName() const = 0;
virtual void launch(FileData* game) = 0; virtual void launch(FileData* game) = 0;
virtual HelpStyle getHelpStyle() override; HelpStyle getHelpStyle() override;
void render(const glm::mat4& parentTrans) override; void render(const glm::mat4& parentTrans) override;

View file

@ -22,16 +22,16 @@ public:
virtual ~ISimpleGamelistView(); virtual ~ISimpleGamelistView();
// Called when a FileData* is added, has its metadata changed, or is removed. // Called when a FileData* is added, has its metadata changed, or is removed.
virtual void onFileChanged(FileData* file, bool reloadGamelist) override; void onFileChanged(FileData* file, bool reloadGamelist) override;
// Called whenever the theme changes. // Called whenever the theme changes.
virtual void onThemeChanged(const std::shared_ptr<ThemeData>& theme) override; void onThemeChanged(const std::shared_ptr<ThemeData>& theme) override;
virtual FileData* getCursor() override = 0; virtual FileData* getCursor() override = 0;
virtual void setCursor(FileData*) override = 0; virtual void setCursor(FileData*) override = 0;
virtual void addPlaceholder(FileData*) override = 0; virtual void addPlaceholder(FileData*) override = 0;
virtual bool input(InputConfig* config, Input input) override; bool input(InputConfig* config, Input input) override;
virtual void launch(FileData* game) override = 0; virtual void launch(FileData* game) override = 0;
virtual const std::vector<std::string>& getFirstLetterIndex() override = 0; virtual const std::vector<std::string>& getFirstLetterIndex() override = 0;

View file

@ -23,15 +23,15 @@ public:
VideoGamelistView(Window* window, FileData* root); VideoGamelistView(Window* window, FileData* root);
virtual ~VideoGamelistView(); virtual ~VideoGamelistView();
virtual void onShow() override; void onShow() override;
virtual void onThemeChanged(const std::shared_ptr<ThemeData>& theme) override; void onThemeChanged(const std::shared_ptr<ThemeData>& theme) override;
virtual std::string getName() const override { return "video"; } std::string getName() const override { return "video"; }
virtual void launch(FileData* game) override; void launch(FileData* game) override;
virtual void preloadGamelist() override { updateInfoPanel(); } void preloadGamelist() override { updateInfoPanel(); }
protected: protected:
virtual void update(int deltaTime) override; void update(int deltaTime) override;
private: private:
void updateInfoPanel(); void updateInfoPanel();

View file

@ -45,7 +45,7 @@ public:
bool input(InputConfig* config, Input input) override; bool input(InputConfig* config, Input input) override;
void render(const glm::mat4& parentTrans) override; void render(const glm::mat4& parentTrans) override;
virtual std::vector<HelpPrompt> getHelpPrompts() override; std::vector<HelpPrompt> getHelpPrompts() override;
private: private:
unsigned int getCurTextColor() const; unsigned int getCurTextColor() const;

View file

@ -86,7 +86,7 @@ public:
void onFocusLost() override; void onFocusLost() override;
void onFocusGained() override; void onFocusGained() override;
virtual std::vector<HelpPrompt> getHelpPrompts() override; std::vector<HelpPrompt> getHelpPrompts() override;
private: private:
class GridEntry class GridEntry

View file

@ -74,7 +74,7 @@ public:
bool input(InputConfig* config, Input input) override; bool input(InputConfig* config, Input input) override;
void update(int deltaTime) override; void update(int deltaTime) override;
void render(const glm::mat4& parentTrans) override; void render(const glm::mat4& parentTrans) override;
virtual std::vector<HelpPrompt> getHelpPrompts() override; std::vector<HelpPrompt> getHelpPrompts() override;
void onSizeChanged() override; void onSizeChanged() override;
void onFocusGained() override { mFocused = true; } void onFocusGained() override { mFocused = true; }

View file

@ -38,10 +38,10 @@ public:
void setFormat(const std::string& format); void setFormat(const std::string& format);
void setDisplayRelative(bool displayRelative); void setDisplayRelative(bool displayRelative);
virtual void applyTheme(const std::shared_ptr<ThemeData>& theme, void applyTheme(const std::shared_ptr<ThemeData>& theme,
const std::string& view, const std::string& view,
const std::string& element, const std::string& element,
unsigned int properties) override; unsigned int properties) override;
protected: protected:
void onTextChanged() override; void onTextChanged() override;

View file

@ -58,7 +58,7 @@ public:
// Force text to be uppercase when in DISP_RELATIVE_TO_NOW mode. // Force text to be uppercase when in DISP_RELATIVE_TO_NOW mode.
void setUppercase(bool uppercase); void setUppercase(bool uppercase);
virtual std::vector<HelpPrompt> getHelpPrompts() override; std::vector<HelpPrompt> getHelpPrompts() override;
private: private:
std::shared_ptr<Font> getFont() const override; std::shared_ptr<Font> getFont() const override;

View file

@ -28,10 +28,10 @@ public:
GridTileComponent(Window* window); GridTileComponent(Window* window);
void render(const glm::mat4& parentTrans) override; void render(const glm::mat4& parentTrans) override;
virtual void applyTheme(const std::shared_ptr<ThemeData>& theme, void applyTheme(const std::shared_ptr<ThemeData>& theme,
const std::string& view, const std::string& view,
const std::string& element, const std::string& element,
unsigned int properties) override; unsigned int properties) override;
// Made this a static function because the ImageGridComponent needs to know the default tile // Made this a static function because the ImageGridComponent needs to know the default tile
// max size to calculate the grid dimension before it instantiates the GridTileComponents. // max size to calculate the grid dimension before it instantiates the GridTileComponents.
@ -53,7 +53,7 @@ public:
glm::vec3 getBackgroundPosition(); glm::vec3 getBackgroundPosition();
virtual void update(int deltaTime) override; void update(int deltaTime) override;
std::shared_ptr<TextureResource> getTexture(); std::shared_ptr<TextureResource> getTexture();

View file

@ -91,12 +91,12 @@ public:
void render(const glm::mat4& parentTrans) override; void render(const glm::mat4& parentTrans) override;
virtual void applyTheme(const std::shared_ptr<ThemeData>& theme, void applyTheme(const std::shared_ptr<ThemeData>& theme,
const std::string& view, const std::string& view,
const std::string& element, const std::string& element,
unsigned int properties) override; unsigned int properties) override;
virtual std::vector<HelpPrompt> getHelpPrompts() override; std::vector<HelpPrompt> getHelpPrompts() override;
private: private:
glm::vec2 mTargetSize; glm::vec2 mTargetSize;

View file

@ -76,7 +76,7 @@ public:
ImageSource getImageSource() { return mImageSource; } ImageSource getImageSource() { return mImageSource; }
protected: protected:
virtual void onCursorChanged(const CursorState& state) override; void onCursorChanged(const CursorState& state) override;
private: private:
// Tiles. // Tiles.

View file

@ -75,7 +75,7 @@ public:
mGrid.setCursorTo(mButtonGrid); mGrid.setCursorTo(mButtonGrid);
} }
virtual std::vector<HelpPrompt> getHelpPrompts() override { return mGrid.getHelpPrompts(); } std::vector<HelpPrompt> getHelpPrompts() override { return mGrid.getHelpPrompts(); }
private: private:
void updateSize(); void updateSize();

View file

@ -40,12 +40,12 @@ public:
void setOriginalColor(unsigned int color) override { mColorOriginalValue = color; } void setOriginalColor(unsigned int color) override { mColorOriginalValue = color; }
void setChangedColor(unsigned int color) override { mColorChangedValue = color; } void setChangedColor(unsigned int color) override { mColorChangedValue = color; }
virtual void applyTheme(const std::shared_ptr<ThemeData>& theme, void applyTheme(const std::shared_ptr<ThemeData>& theme,
const std::string& view, const std::string& view,
const std::string& element, const std::string& element,
unsigned int properties) override; unsigned int properties) override;
virtual std::vector<HelpPrompt> getHelpPrompts() override; std::vector<HelpPrompt> getHelpPrompts() override;
private: private:
void updateVertices(); void updateVertices();

View file

@ -36,7 +36,7 @@ public:
void onSizeChanged() override; void onSizeChanged() override;
virtual std::vector<HelpPrompt> getHelpPrompts() override; std::vector<HelpPrompt> getHelpPrompts() override;
private: private:
void onValueChanged(); void onValueChanged();

View file

@ -39,7 +39,7 @@ public:
unsigned int getColorShift() const override { return mImage.getColorShift(); } unsigned int getColorShift() const override { return mImage.getColorShift(); }
virtual std::vector<HelpPrompt> getHelpPrompts() override; std::vector<HelpPrompt> getHelpPrompts() override;
private: private:
void onStateChanged(); void onStateChanged();

View file

@ -61,12 +61,12 @@ public:
void setSelectable(bool status) { mSelectable = status; } void setSelectable(bool status) { mSelectable = status; }
virtual void applyTheme(const std::shared_ptr<ThemeData>& theme, void applyTheme(const std::shared_ptr<ThemeData>& theme,
const std::string& view, const std::string& view,
const std::string& element, const std::string& element,
unsigned int properties) override; unsigned int properties) override;
virtual std::vector<HelpPrompt> getHelpPrompts() override; std::vector<HelpPrompt> getHelpPrompts() override;
unsigned int getColor() const override { return mColor; } unsigned int getColor() const override { return mColor; }
std::shared_ptr<Font> getFont() const override { return mFont; } std::shared_ptr<Font> getFont() const override { return mFont; }

View file

@ -43,7 +43,7 @@ public:
void setCursor(size_t pos); void setCursor(size_t pos);
virtual std::vector<HelpPrompt> getHelpPrompts() override; std::vector<HelpPrompt> getHelpPrompts() override;
private: private:
void onTextChanged(); void onTextChanged();

View file

@ -95,12 +95,12 @@ public:
void setLineSpacing(float lineSpacing) { mLineSpacing = lineSpacing; } void setLineSpacing(float lineSpacing) { mLineSpacing = lineSpacing; }
protected: protected:
virtual void onScroll() override void onScroll() override
{ {
if (!NavigationSounds::getInstance().isPlayingThemeNavigationSound(SCROLLSOUND)) if (!NavigationSounds::getInstance().isPlayingThemeNavigationSound(SCROLLSOUND))
NavigationSounds::getInstance().playThemeNavigationSound(SCROLLSOUND); NavigationSounds::getInstance().playThemeNavigationSound(SCROLLSOUND);
} }
virtual void onCursorChanged(const CursorState& state) override; void onCursorChanged(const CursorState& state) override;
private: private:
int mLoopOffset; int mLoopOffset;

View file

@ -45,17 +45,17 @@ public:
// Set the opacity for the embedded static image. // Set the opacity for the embedded static image.
void setOpacity(unsigned char opacity) override { mOpacity = opacity; } void setOpacity(unsigned char opacity) override { mOpacity = opacity; }
virtual void onShow() override; void onShow() override;
virtual void onHide() override; void onHide() override;
virtual void onStopVideo() override; void onStopVideo() override;
virtual void onPauseVideo() override; void onPauseVideo() override;
virtual void onUnpauseVideo() override; void onUnpauseVideo() override;
virtual bool isVideoPaused() override { return mPause; } bool isVideoPaused() override { return mPause; }
virtual void onScreensaverActivate() override; void onScreensaverActivate() override;
virtual void onScreensaverDeactivate() override; void onScreensaverDeactivate() override;
virtual void onGameLaunchedActivate() override; void onGameLaunchedActivate() override;
virtual void onGameLaunchedDeactivate() override; void onGameLaunchedDeactivate() override;
virtual void topWindow(bool isTop) override; void topWindow(bool isTop) override;
// These functions update the embedded static image. // These functions update the embedded static image.
void onOriginChanged() override { mStaticImage.setOrigin(mOrigin); } void onOriginChanged() override { mStaticImage.setOrigin(mOrigin); }
@ -65,14 +65,14 @@ public:
void render(const glm::mat4& parentTrans) override; void render(const glm::mat4& parentTrans) override;
void renderSnapshot(const glm::mat4& parentTrans); void renderSnapshot(const glm::mat4& parentTrans);
virtual void applyTheme(const std::shared_ptr<ThemeData>& theme, void applyTheme(const std::shared_ptr<ThemeData>& theme,
const std::string& view, const std::string& view,
const std::string& element, const std::string& element,
unsigned int properties) override; unsigned int properties) override;
virtual std::vector<HelpPrompt> getHelpPrompts() override; std::vector<HelpPrompt> getHelpPrompts() override;
virtual void update(int deltaTime) override; void update(int deltaTime) override;
// Resize the video to fit this size. If one axis is zero, scale that axis to maintain // Resize the video to fit this size. If one axis is zero, scale that axis to maintain
// aspect ratio. If both are non-zero, potentially break the aspect ratio. If both are // aspect ratio. If both are non-zero, potentially break the aspect ratio. If both are

View file

@ -52,7 +52,7 @@ private:
void resize(); void resize();
void render(const glm::mat4& parentTrans) override; void render(const glm::mat4& parentTrans) override;
virtual void updatePlayer() override; void updatePlayer() override;
// This will run the frame processing in a separate thread. // This will run the frame processing in a separate thread.
void frameProcessing(); void frameProcessing();
@ -75,13 +75,13 @@ private:
bool decoderInitHW(); bool decoderInitHW();
// Start the video immediately. // Start the video immediately.
virtual void startVideo() override; void startVideo() override;
// Stop the video. // Stop the video.
virtual void stopVideo() override; void stopVideo() override;
// Pause the video when a game has been launched. // Pause the video when a game has been launched.
virtual void pauseVideo() override; void pauseVideo() override;
// Handle looping the video. Must be called periodically. // Handle looping the video. Must be called periodically.
virtual void handleLooping() override; void handleLooping() override;
static enum AVHWDeviceType sDeviceType; static enum AVHWDeviceType sDeviceType;
static enum AVPixelFormat sPixelFormat; static enum AVPixelFormat sPixelFormat;