RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    More delayed scroll start of description (patch sample)

    Scheduled Pinned Locked Moved Ideas and Development
    scrollingdescription
    7 Posts 3 Posters 526 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • LolonoisL
      Lolonois
      last edited by

      The description currently starts one second after a game is selected in the list. The quick onset of scrolling has been mentioned here, and partially here.

      FWIW, I provided a quick initial patch which delays the start of description that do not fit into the component to five seconds.

      If someone perceives it useful feel free to use/comment/extend my suggestion.

      diff --git a/es-app/src/views/gamelist/DetailedGameListView.cpp b/es-app/src/views/gamelist/DetailedGameListView.cpp
      index 6646e72..090a446 100644
      --- a/es-app/src/views/gamelist/DetailedGameListView.cpp
      +++ b/es-app/src/views/gamelist/DetailedGameListView.cpp
      @@ -5,7 +5,7 @@
       
       DetailedGameListView::DetailedGameListView(Window* window, FileData* root) :
       	BasicGameListView(window, root),
      -	mDescContainer(window), mDescription(window),
      +	mDescContainer(window, DESCRIPTION_SCROLL_DELAY), mDescription(window),
       	mThumbnail(window),
       	mMarquee(window),
       	mImage(window),
      diff --git a/es-app/src/views/gamelist/GridGameListView.cpp b/es-app/src/views/gamelist/GridGameListView.cpp
      index a95033d..25a1aa8 100644
      --- a/es-app/src/views/gamelist/GridGameListView.cpp
      +++ b/es-app/src/views/gamelist/GridGameListView.cpp
      @@ -17,7 +17,7 @@ GridGameListView::GridGameListView(Window* window, FileData* root) :
       	mImage(window),
       	mVideo(nullptr),
       	mVideoPlaying(false),
      -	mDescContainer(window), mDescription(window),
      +	mDescContainer(window, DESCRIPTION_SCROLL_DELAY), mDescription(window),
       
       	mLblRating(window), mLblReleaseDate(window), mLblDeveloper(window), mLblPublisher(window),
       	mLblGenre(window), mLblPlayers(window), mLblLastPlayed(window), mLblPlayCount(window),
      diff --git a/es-app/src/views/gamelist/ISimpleGameListView.h b/es-app/src/views/gamelist/ISimpleGameListView.h
      index 785f399..25a8cac 100644
      --- a/es-app/src/views/gamelist/ISimpleGameListView.h
      +++ b/es-app/src/views/gamelist/ISimpleGameListView.h
      @@ -28,6 +28,8 @@ public:
       	virtual void launch(FileData* game) = 0;
       
       protected:
      +        static const int DESCRIPTION_SCROLL_DELAY = 5 * 1000; // five secs
      +
       	virtual std::string getQuickSystemSelectRightButton() = 0;
       	virtual std::string getQuickSystemSelectLeftButton() = 0;
       	virtual void populateList(const std::vector<FileData*>& files) = 0;
      diff --git a/es-app/src/views/gamelist/VideoGameListView.cpp b/es-app/src/views/gamelist/VideoGameListView.cpp
      index de24468..f5b746b 100644
      --- a/es-app/src/views/gamelist/VideoGameListView.cpp
      +++ b/es-app/src/views/gamelist/VideoGameListView.cpp
      @@ -13,7 +13,7 @@
       
       VideoGameListView::VideoGameListView(Window* window, FileData* root) :
       	BasicGameListView(window, root),
      -	mDescContainer(window), mDescription(window),
      +	mDescContainer(window, DESCRIPTION_SCROLL_DELAY), mDescription(window),
       	mThumbnail(window),
       	mMarquee(window),
       	mImage(window),
      diff --git a/es-core/src/components/ScrollableContainer.cpp b/es-core/src/components/ScrollableContainer.cpp
      index 5157b97..00595ab 100644
      --- a/es-core/src/components/ScrollableContainer.cpp
      +++ b/es-core/src/components/ScrollableContainer.cpp
      @@ -7,8 +7,8 @@
       #define AUTO_SCROLL_DELAY 1000 // ms to wait before we start to scroll
       #define AUTO_SCROLL_SPEED 50 // ms between scrolls
       
      -ScrollableContainer::ScrollableContainer(Window* window) : GuiComponent(window),
      -	mAutoScrollDelay(0), mAutoScrollSpeed(0), mAutoScrollAccumulator(0), mScrollPos(0, 0), mScrollDir(0, 0), mAutoScrollResetAccumulator(0)
      +ScrollableContainer::ScrollableContainer(Window* window, int scrollDelay) : GuiComponent(window),
      +	mAutoScrollDelay(scrollDelay), mAutoScrollSpeed(0), mAutoScrollAccumulator(0), mScrollPos(0, 0), mScrollDir(0, 0), mAutoScrollResetAccumulator(0)
       {
       }
       
      @@ -39,7 +39,10 @@ void ScrollableContainer::setAutoScroll(bool autoScroll)
       	if(autoScroll)
       	{
       		mScrollDir = Vector2f(0, 1);
      -		mAutoScrollDelay = AUTO_SCROLL_DELAY;
      +                if (mAutoScrollDelay == 0)
      +                {
      +                        mAutoScrollDelay = AUTO_SCROLL_DELAY;
      +                }
       		mAutoScrollSpeed = AUTO_SCROLL_SPEED;
       		reset();
       	}else{
      diff --git a/es-core/src/components/ScrollableContainer.h b/es-core/src/components/ScrollableContainer.h
      index 6700a78..4563e91 100644
      --- a/es-core/src/components/ScrollableContainer.h
      +++ b/es-core/src/components/ScrollableContainer.h
      @@ -7,7 +7,7 @@
       class ScrollableContainer : public GuiComponent
       {
       public:
      -	ScrollableContainer(Window* window);
      +	ScrollableContainer(Window* window, int scrollDelay = 0);
       
       	Vector2f getScrollPos() const;
       	void setScrollPos(const Vector2f& pos);
      
      BuZzB 1 Reply Last reply Reply Quote 4
      • Z
        zerojay
        last edited by

        Send a pull request.

        BuZzB 1 Reply Last reply Reply Quote 0
        • BuZzB
          BuZz administrators @Lolonois
          last edited by

          @Lolonois this looks useful thanks. I would submit a PR - but appreciate you commenting here first.

          To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

          1 Reply Last reply Reply Quote 0
          • BuZzB
            BuZz administrators @zerojay
            last edited by

            @zerojay just to note it's requested on our ES and RetroPie repo that people comment here first with ideas. In this case it's a small yet useful change (and with code) but just wanted to comment that this was a good place to float the idea.

            To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

            Z 1 Reply Last reply Reply Quote 0
            • Z
              zerojay @BuZz
              last edited by

              @BuZz said in More delayed scroll start of description (patch sample):

              @zerojay just to note it's requested on our ES and RetroPie repo that people comment here first with ideas. In this case it's a small yet useful change (and with code) but just wanted to comment that this was a good place to float the idea.

              I wasn't meaning "don't post that here, send a pull request instead" when I said he should make a pull request, just so you know.

              BuZzB 1 Reply Last reply Reply Quote 1
              • BuZzB
                BuZz administrators @zerojay
                last edited by BuZz

                @zerojay Sorry. Just clarifying in case.

                Also might be best to wait for the main ES devs etc.

                Cheers.

                To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                1 Reply Last reply Reply Quote 0
                • LolonoisL
                  Lolonois
                  last edited by

                  PR is filed: https://github.com/RetroPie/EmulationStation/pull/695

                  Let's keep any extended discussion here.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post

                  Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                  Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.