JimmyJimmy Posted April 3, 2014 Share Posted April 3, 2014 Hello, First off, amazing work. I did have a question, I find my self referring to the Class documentation located here: http://docs.phaser.io/ And I was wondering in what order are the classes sorted? It seems like if they were all alphabetical it would be easier to find things. Thank you. JJ drhayes and valueerror 2 Link to comment Share on other sites More sharing options...
rich Posted April 4, 2014 Share Posted April 4, 2014 They're alphabetical by namespace. Which is why it goes: NetParticlesEmitter because the Emitter is actually Phaser.Particles.Emitter If they were truly alphabetical you'd have 3 Body classes in a row, etc I don't think the drop-down list is that great, but don't have an alternative at the moment I'm afraid, it's just part of the template we use (which is included in the docs/build folder if someone wants to have a go at improving it) Link to comment Share on other sites More sharing options...
rich Posted April 4, 2014 Share Posted April 4, 2014 What would help is if children appeared indented from parents:NetParticles EmitterPhysicsetc Link to comment Share on other sites More sharing options...
JimmyJimmy Posted April 7, 2014 Author Share Posted April 7, 2014 Indention would be very helpful. Link to comment Share on other sites More sharing options...
adamyall Posted April 7, 2014 Share Posted April 7, 2014 I tried taking a look at the template code, but I wasn't familiar with how the docs are built.I ended up making a UserScript that can act as a band-aid for this problem until the doc generation is updated:http://userscripts.org/scripts/show/453098 This simply uses jQuery to indent based on some of the namespace structure. More of a hack than a fix, but I prefer it now. EDIT: You can install a UserScript after adding the GreaseMonkey extension to Firefox or TamperMonkey with Chrome. Only tested with Firefox. Link to comment Share on other sites More sharing options...
JimmyJimmy Posted April 10, 2014 Author Share Posted April 10, 2014 Very cool solution adamhoydenyall, worked great =) adamyall 1 Link to comment Share on other sites More sharing options...
rich Posted April 11, 2014 Share Posted April 11, 2014 The docs are now indented after a kindly pull request fixed them tonight. Will be visible in the 2.0.3 release on Friday. adamyall 1 Link to comment Share on other sites More sharing options...
Martiny Posted April 11, 2014 Share Posted April 11, 2014 One day I stumbled upon this: http://harvesthq.github.io/chosen/ Wouldn't that be great? I don't know how to implement that, but it is an idea. A drop-down list that you can search and with indentation. Link to comment Share on other sites More sharing options...
Mike Posted April 11, 2014 Share Posted April 11, 2014 Hey Martiny I was thinking the same but using this: http://ivaynberg.github.io/select2/ and now I made a very fast demo of how it can be used in Phasers docs You can check it here: http://mihail.ilinov.eu/temp/PhaserDocs/ The select is only on the homepage since this html is multiplied across all templates but if Rich and the others like it and also style it a bit as they likethen it's going to be cool. The whole code is refactoring the menu to select, with options like: <option value="Phaser.Game.html">Game</option>and this bit of js and css:/* PHASER CODE */#ClassesDropDownHolder {}#ClassesDropDownHolder .select2-chosen { color: #000; padding-left: 5px;} <script> $(document).ready(function() { $("#ClassesDropDown").select2(); $("#ClassesDropDown").on("change", function(e) { console.log(e); console.log(e.val); window.location.href = e.val; }) }); </script>and this two files of course: select2.cssselect2.min.js Also this plugin has really cool, options and is well organized with callbacks, and good life cycle so you can do pretty much anything Check the examples. Link to comment Share on other sites More sharing options...
Recommended Posts