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

    Pegasus theme development general

    Scheduled Pinned Locked Moved Ideas and Development
    pegasusqmltheme makingtheme help
    156 Posts 16 Posters 51.7k 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.
    • halfmanhalfcakeH
      halfmanhalfcake
      last edited by

      So last night I created an XMB type of theme, which is nearly ready I guess:
      https://imgur.com/a/FS9GdO8

      I have a few issues so far, I might need your help reviewing the code.

      • How do I delay the background wallpaper appearing? I have tried Pause Animation and timer, but no luck yet. On the PS3 there is a 1-2 second delay before the background appears and I want to re-create that delay before the image appears. The code I have so far is a simple Image {} code:
      Rectangle {....        
      
      Image {
                  id: backgroundart
                  //verticalAlignment: Image.AlignTop
                  anchors.right: parent.right
                  width: parent.width
                  height: parent.height
                  fillMode: Image.PreserveAspectCrop
                  visible: source
                  source: api.currentGame.assets.background
                  sourceSize { width: 1280; height: 720 }
                  asynchronous: true
                  opacity: 1
              }
      }
      
      
      - I have a drop shadow on the vertical listview delegate (the game icon), which gives a shadow to every icon in that list. I only want the shadow for the selected game icon, not for every one. 
      
      
          Component {...
              Rectangle {....
                  Image {
                      id: gamesart
                      width: parent.width
                      height: parent.height
                      fillMode: Image.PreserveAspectFit
                      source: assets.logo ||assets.banner || assets.steam || assets.boxFront
                      asynchronous: true
                      sourceSize { width: 300; height: 300 }
                      horizontalAlignment: Image.AlignHCenter
                      verticalAlignment: Image.AlignVCenter
                  }
      
                  DropShadow {
                      anchors.fill: gamesart
                      horizontalOffset: 3
                      verticalOffset: 3
                      radius: 8.0
                      samples: 17
                      color: "#80000000"
                      source: gamesart
                  }  }   }
      

      So far I have tried adding [visible] line to the DropShadow with ListView.isCurrentItem ? true : false, which did not work

      Hope that's clear enough.

      1 Reply Last reply Reply Quote 0
      • T
        tronkyfran
        last edited by

        Are you trying to fade in the image? If thats the case I think I have code for delaying it before it gets the image on top, but I'm afraid I wont be able to give it to you till monday(I have the test code at work).

        halfmanhalfcakeH 1 Reply Last reply Reply Quote 0
        • halfmanhalfcakeH
          halfmanhalfcake @tronkyfran
          last edited by

          @tronkyfran I managed to fade the image earlier (somehow) but everytime you go to a game with no background, and then back to the game it doesn't fade anymore, so I gave up :(

          I'm just trying to delay the background showing, if it includes a fade, even better :)

          1 Reply Last reply Reply Quote 0
          • T
            tronkyfran
            last edited by

            I had the same problem there, had to make a special "if" with a special image for those cases(no background) and it worked pretty well. That said I'm not very fond of my programming skills, so take it with a grain of salt :D

            halfmanhalfcakeH 1 Reply Last reply Reply Quote 0
            • halfmanhalfcakeH
              halfmanhalfcake @tronkyfran
              last edited by

              @tronkyfran Ah, this is my first time trying to code something. I've only ever played around with HTML before and using the inspect element in Chrome.

              1 Reply Last reply Reply Quote 0
              • fluffypillowF
                fluffypillow
                last edited by

                @halfmanhalfcake nice, happy to see it's taking shape :)

                • I'm actually using a delay too, but for the videos, to not load instantly during scrolling. It's here in the main theme code. I've created a Timer called videoDelay which is restarted every time a particular variable changes (see it above). The interval it set to a short 50ms (default: 1 sec), and when it triggers, I set the video to play and start the playback. You could do something similar, except that you'll probably need to change the Image's source instead.

                • for the shadow, ListView.isCurrentItem would be my first guess too, does it have no effect at all? Maybe try creating a new property bool in it's parent Rectangle to to store the value of ListView.isCurrentItem, then use that property in the DropShadow.

                1 Reply Last reply Reply Quote 1
                • lilbudL
                  lilbud
                  last edited by

                  I need to get back to making my theme, except the fact that I speak code as well as I speak Spanish

                  I failed Spanish class

                  Creator of the Radiocade: https://retropie.org.uk/forum/topic/6077/radiocade

                  Backlog: http://backloggery.com/lilbud

                  1 Reply Last reply Reply Quote 0
                  • H
                    honorio96
                    last edited by

                    Is there any way to add sounds at startup and in the Pegasus navigation keys?

                    fluffypillowF 1 Reply Last reply Reply Quote 0
                    • fluffypillowF
                      fluffypillow @honorio96
                      last edited by

                      @honorio96 somehow I missed your post, sorry. SoundEffect items should work for key presses, but if I remember correctly, they didn't load for someone. Will check that. There isn't really a "loading complete" event yet, but you might be able to play some sound when the theme first gets the input focus, or on Component.onCompleted.

                      1 Reply Last reply Reply Quote 0
                      • T
                        tronkyfran
                        last edited by tronkyfran

                        Testing some things, still long way to go.
                        0_1535101655464_TEST_01_PEGASUS_THEME_V01.jpg

                        Still not sure about metadata placement or carousel scaling, I accept suggestions. Gameplay video will be displayed at monitor, performance is pretty good(at windows).

                        I have created new art for about 200 games for amstrad, so I think an Amtrad CPC versión will come pretty soon,
                        as well as color version with color monitor.

                        1 Reply Last reply Reply Quote 1
                        • T
                          tronkyfran
                          last edited by

                          https://streamable.com/ktair

                          AndersHPA 1 Reply Last reply Reply Quote 1
                          • fluffypillowF
                            fluffypillow
                            last edited by

                            @tronkyfran Very nice! Is this actual 3D?

                            T 1 Reply Last reply Reply Quote 0
                            • T
                              tronkyfran @fluffypillow
                              last edited by

                              @fluffypillow Well, its 3d rendered everything, but not realtime 3d on Qt sadly, I just have not enough prog skills yo do that, so If have to remake all the cover art by hand. It can automate some things tough.

                              1 Reply Last reply Reply Quote 0
                              • D
                                dmmarti
                                last edited by

                                I've got a quick question, that I've not yet found the answer to while reading through all of the forum posts for Pegasus-FE.

                                Installing the frontend from the RetroPie Setup script, I've found the "themes" folder where I can add my own into (in the /opt/retropie/configs/all directory).

                                But where does the default pegasus-fe theme get installed to? I'd like to add some additional logos into it but I've not been able to find where the built-in default location for "pegasus-grid" is?

                                I know it's probably something simple and I've just overlooked it in the previous forum posts...but so far, I've not been able to locate it's directory.

                                fluffypillowF 1 Reply Last reply Reply Quote 0
                                • fluffypillowF
                                  fluffypillow @dmmarti
                                  last edited by

                                  @dmmarti Actually it's build into the program itself, as to always have one undeleteable theme ready in case of problems. You can find its sources here, after downloading and placing it in the theme directory, it works just like any other theme. (You can download the sources here, with the green 'Clone or download' button.)

                                  D 1 Reply Last reply Reply Quote 0
                                  • D
                                    dmmarti @fluffypillow
                                    last edited by

                                    @fluffypillow
                                    Ah...that explains why I could never find it.! Haha

                                    Thanks for getting back to me. I've just started tinkering with Pegasus and learning it's ins-and-outs while I'm beginning to learn theming for it.

                                    Thanks for everything and developing Pegasus.

                                    1 Reply Last reply Reply Quote 1
                                    • PlayingKarrdeP
                                      PlayingKarrde
                                      last edited by

                                      This post is deleted!
                                      1 Reply Last reply Reply Quote 0
                                      • T
                                        Thistlebrew
                                        last edited by

                                        I am really confused with the interfacing with the API. I know the tutorials state that the API mentioned in them is out of date so I switched over to trying to use the API documentation to figure out my issue. I have also tried reviewing the example themes' code to try and figure this out.

                                        I have this code (just trying to get a repeating list, no navigation at this point.):

                                         ListView
                                         {
                                        	
                                         	id: collectionBigScroll
                                         	orientation: ListView.Horizontal
                                        	
                                         	model: api.collections.games
                                        	
                                         	delegate: 
                                        
                                         	Rectangle {
                                            // as we calculated previously
                                            width: vpx(240)
                                            height: vpx(135)
                                        
                                            color: "green"
                                        
                                            Text {
                                               
                                                text: modelData.title
                                            }
                                        		
                                        	// Image {
                                        	// 		id: gameItem
                                        	// 		source: modelData.assets.boxFront
                                        			
                                        	// 		fillMode: Image.PreserveAspectFit
                                        	// 		asynchronous: true
                                        			
                                        	// 		}
                                        	
                                        		
                                        	}
                                        }
                                        
                                        
                                        

                                        If I try just the Image (currently commented out) or the rectangle+text objects on their own, not in a list view, they get drawn on the screen. If I add them to the list view, I get nothing on the screen. Its almost like the list contains nothing, which I know it does, because the example themes display just fine. I am not getting any errors in the console either, which I was when I was trying to follow the tutorials and using the wrong API data.

                                        Anything I may be missing? Still really new to QML so that may not be doing me any favors.

                                        fluffypillowF 1 Reply Last reply Reply Quote 0
                                        • fluffypillowF
                                          fluffypillow @Thistlebrew
                                          last edited by

                                          @Thistlebrew Ah sorry, the documentation of games and collections was described incorrectly: the listed properties belong not to the model, but the elements of the model. I've fixed the relevant part; hope it's less confusing now, but feel free to ask if you run into troubles.

                                          Yeah the tutorials are in need of an update, with the current API changes in progress and all. Will definitely update them after the development of these parts is mostly done.

                                          1 Reply Last reply Reply Quote 0
                                          • PlayingKarrdeP
                                            PlayingKarrde
                                            last edited by PlayingKarrde

                                            @fluffypillow I'm unfortunately stuck again haha. How can I use the filters to find a collection from api.allGames? It doesn't seem to accept collection as a roleName from what I can tell.

                                            The reason why is I want to also be able to sort and filter based on the collection and potentially have multiple collections returned (otherwise api.collections would work fine).

                                            fluffypillowF 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.