// SPDX-License-Identifier: MIT // // EmulationStation Desktop Edition // SystemView.h // // Main system view. // #ifndef ES_APP_VIEWS_SYSTEM_VIEW_H #define ES_APP_VIEWS_SYSTEM_VIEW_H #include "GuiComponent.h" #include "Sound.h" #include "SystemData.h" #include "components/CarouselComponent.h" #include "components/DateTimeComponent.h" #include "components/LottieComponent.h" #include "components/ScrollableContainer.h" #include "components/TextComponent.h" #include "components/TextListComponent.h" #include "components/VideoFFmpegComponent.h" #include "resources/Font.h" #include class SystemData; struct SystemViewElements { std::string name; std::string fullName; std::vector legacyExtras; std::vector children; std::vector> gameCountComponents; std::vector> textComponents; std::vector> imageComponents; std::vector> videoComponents; std::vector> lottieAnimComponents; std::vector> containerComponents; std::vector> containerTextComponents; }; class SystemView : public GuiComponent { public: SystemView(); ~SystemView(); void goToSystem(SystemData* system, bool animate); bool input(InputConfig* config, Input input) override; void update(int deltaTime) override; void render(const glm::mat4& parentTrans) override; bool isScrolling() { return mCarousel->isScrolling(); } void stopScrolling() { mCarousel->stopScrolling(); } bool isSystemAnimationPlaying(unsigned char slot) { return mCarousel->isAnimationPlaying(slot); } void finishSystemAnimation(unsigned char slot) { finishAnimation(slot); mCarousel->finishAnimation(slot); } CarouselComponent::CarouselType getCarouselType() { return mCarousel->getType(); } SystemData* getFirstSystem() { return mCarousel->getFirst(); } void onThemeChanged(const std::shared_ptr& theme); std::vector getHelpPrompts() override; HelpStyle getHelpStyle() override; protected: void onCursorChanged(const CursorState& state); private: void populate(); void updateGameCount(); // Get the ThemeElements that make up the SystemView. void getViewElements(const std::shared_ptr& theme); void renderFade(const glm::mat4& trans); std::unique_ptr mCarousel; std::unique_ptr mLegacySystemInfo; std::vector mSystemElements; float mCamOffset; float mFadeOpacity; bool mUpdatedGameCount; bool mViewNeedsReload; bool mLegacyMode; }; #endif // ES_APP_VIEWS_SYSTEM_VIEW_H