Skip to content

Contributing

payne911 edited this page Aug 31, 2020 · 18 revisions

If you are looking forward to helping this library grow, here is a list of Pull Requests you could send our way. Please issue the request to be merged with the pull_request branch of the project.

Animations

The current implementation is sloppy and involves a lot of duplicated code. Ideally, we would offer something similar to how libGDX's Dialog works, that is: animations done with Actions.

As it is, there is a branch under development, but I'm not specifically proud of what's going on in there. I'm hoping someone else's work would prove to be much nicer.

Drawables

The Style should probably also support using scene2d Drawables (instead of only Colors) for the different states (selected, hovered, and highlighted). Here is an image to better illustrate the functionalities such a feature would support:

example image

Relevancy-sort

A flag should be available to sort elements as presented in the image below. First element should be at 12 o'clock, and the rest of the elements would alternatively be inserted on each side.

Multi-level menu

There should be an easy integration for supporting multiple levels of menu.

another example image

EllipticalGroup

Anyone trying to mess with, say, setWidth() without accordingly using setHeight(), will have problems because the widget assumes a round shape.

Scaling: setScale()

The operation should possibly be overriden so as to be able to properly apply it to the widget. As it is, only the contained Actors are being scaled.

Where to start

It's always overwhelming to start on a new code-base. I thought it might be useful for the potential helpers to have a list of some of the methods that are the most at the core of the library:

  • hit : affects the dispatching of the events related to the mouse (on the scene2d side of things).
  • layout : affects the layout of the children of all the widgets (on the scene2d side of things).
  • findChildIndexAtStage : used by the library to find which slice a position within the Stage might map to.