Jump to content

Phaser Documentation Question


JimmyJimmy
 Share

Recommended Posts

They're alphabetical by namespace.

 

Which is why it goes:

 

Net

Particles

Emitter

 

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

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

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 like

then 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.css

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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...