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.9k 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.
    • 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
                        • fluffypillowF
                          fluffypillow @PlayingKarrde
                          last edited by

                          @PlayingKarrde ah so that's why SQL would be useful for you! Unfortunately there's no built-in way for such reverse-lookup yet, the games have no information about the collections they contain them at the moment. As a workaround, you could do the lookup manually, by going through all the collections in eg. a for loop and check its games member whether it contains the particular game (something like <theCollection>.games.contains(<theGame>)). It requires some programming, and probably won't be too fast... I'll see how much increase would be in the memory usage by adding a list of collections for each game.

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

                            @fluffypillow Ah. Hmm yeah I feel like it would be important. Another (and probably better?) example would be if you're doing a search and it returns all games, having information for what system that game is seems important (especially if you have the same game on various systems).

                            I won't do the for loop for now as I don't want to sacrifice speed. For the time being I'll just do my filtering based on the current collection as that will get me a large part of the way to accomplish what I'm currently trying.

                            Also do you happen to know how to return only a certain number of results? I want to do a recently played list but only want to return 3 entries. Can't seem to figure it out.

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

                              @PlayingKarrde yeah I can see the use cases, I was just worrying about the increase in memory usage. Such overhead shouldn't cause problems, but better safe than sorry.

                              Also do you happen to know how to return only a certain number of results?

                              IndexFilter might fit here, with maximumIndex: 2 (which would result a list with game[0], game[1], game[2] as elements).

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

                                @fluffypillow Yeah that's what I was originally using but it was just returning the first three games in general. Upon further reflection though I think that suggests my filters aren't working correctly.

                                1 Reply Last reply Reply Quote 0
                                • AndersHPA
                                  AndersHP @tronkyfran
                                  last edited by

                                  @tronkyfran that's so neat!
                                  It would be so cool to see cartridges getting put into their respective machines upon gamestart, but maybe that's just me dreaming! :-)

                                  My "Bubble Bobble" Themed Bartop Arcade
                                  My Gameboy

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    spartan
                                    last edited by

                                    @fluffypillow I'm trying to build Android version, but after installing QT Creator and everything else, I get the following error in QT Creator:

                                    Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++: not found
                                    
                                    

                                    Using Android NDK 19.2.534500
                                    SDK 26.1.1
                                    QT 4.9.0
                                    Java SDK 8

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

                                      @spartan yes, Google removed GCC from the NDK not too long ago. To build using the latest NDK, you'll need at least Qt 5.12, while for older versions, you should use NDK r10e.

                                      1 Reply Last reply Reply Quote 0
                                      • W
                                        wallmachine
                                        last edited by

                                        @fluffypillow a while back you mentioned that you were going to update theme documentation because of some overhaul did the documentation ever get updated?

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

                                          @wallmachine not yet, but I do have some plans and outlines for their contents. The current ones ended up a bit massive, so this time I'll likely split things into smaller chapters, which should come sooner (well, once I actually start writing the guide) and easier to follow. I also plan to some add QML tutorials too.

                                          1 Reply Last reply Reply Quote 0
                                          • W
                                            wallmachine
                                            last edited by

                                            2019-04-23T13:38:09 [i] Theme set to 'Simple theme' (`D:/Pegasus/themes/tutorial-simple/`)
                                            2019-04-23T13:38:09 [i] Program settings saved
                                            2019-04-23T13:38:09 [w] file:///D:/Pegasus/themes/tutorial-simple/theme.qml:29: TypeError: Cannot read property 'shortname' of undefined
                                            2019-04-23T13:38:09 [w] file:///D:/Pegasus/themes/tutorial-simple/theme.qml:44: TypeError: Cannot read property 'index' of undefined
                                            2019-04-23T13:38:09 [w] file:///D:/Pegasus/themes/tutorial-simple/theme.qml:42: TypeError: Cannot read property 'model' of undefined
                                            2019-04-23T13:38:09 [w] file:///D:/Pegasus/themes/tutorial-simple/theme.qml:40: TypeError: Cannot read property 'gameList' of undefined
                                            2019-04-23T13:38:09 [w] file:///D:/Pegasus/themes/tutorial-simple/theme.qml:102: TypeError: Cannot read property 'assets' of undefined
                                            2019-04-23T13:38:09 [w] file:///D:/Pegasus/themes/tutorial-simple/theme.qml:110: TypeError: Cannot read property 'title' of undefined
                                            2019-04-23T13:38:09 [w] file:///D:/Pegasus/themes/tutorial-simple/theme.qml:134: TypeError: Cannot read property 'developer' of undefined
                                            2019-04-23T13:38:09 [w] file:///D:/Pegasus/themes/tutorial-simple/theme.qml:145: TypeError: Cannot read property 'year' of undefined
                                            2019-04-23T13:38:09 [w] file:///D:/Pegasus/themes/tutorial-simple/theme.qml:141: TypeError: Cannot read property 'year' of undefined
                                            2019-04-23T13:38:09 [w] file:///D:/Pegasus/themes/tutorial-simple/theme.qml:152: TypeError: Cannot read property 'summary' of undefined
                                            
                                            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.