Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use an enum for specifying play modes for animations. #1507

Merged
merged 1 commit into from Mar 21, 2014

Conversation

@lioncash
Copy link
Contributor

lioncash commented Mar 20, 2014

This is an API change, so I understand if this is denied. However, I think this is a better choice as the user of the API cannot arbitrarily enter random values at will and narrows them to the valid ones written in the enum.

This way of doing play modes seems more 'solid' to me, but that's just my opinion.

@NathanSweet

This comment has been minimized.

Copy link
Member

NathanSweet commented Mar 20, 2014

While enums are a bit better, I don't see a reason to break the API just to change from int to enum.

@badlogic

This comment has been minimized.

Copy link
Member

badlogic commented Mar 20, 2014

I too agree that enums are better. Since we are approaching 1.0, not would be a good time to break it, no? You like breaking things :)

@NathanSweet

This comment has been minimized.

Copy link
Member

NathanSweet commented Mar 20, 2014

Then you merge and update changes and write a blargh post! :D

@Zomby2D

This comment has been minimized.

Copy link
Contributor

Zomby2D commented Mar 21, 2014

Might as well break it now and have a more robust 1.0 API down the line.

@badlogic badlogic merged commit e020ee2 into libgdx:master Mar 21, 2014
@lioncash lioncash deleted the lioncash:animation-playmode branch Mar 21, 2014
@jrenner

This comment has been minimized.

Copy link
Member

jrenner commented Mar 22, 2014

If we are breaking API by converting ints to enums Input.Keys would be a good candidate

@NathanSweet

This comment has been minimized.

Copy link
Member

NathanSweet commented Mar 22, 2014

Look what you started @badlogic !

@MobiDevelop

This comment has been minimized.

Copy link
Member

MobiDevelop commented Mar 22, 2014

I think Input.Keys should stay as is. Changing that is a much bigger deal than changing the Animation play modes.

@badlogic

This comment has been minimized.

Copy link
Member

badlogic commented Mar 22, 2014

I'm actuallynot so sure. If we want to clean things for 1.o we might as
well just make keysenums. I mean we just removed GLES 1, which was also a
pretty big deal, there shouldn't even be any issue compilation wise with
making keys enums.
On Mar 22, 2014 1:54 PM, "MobiDevelop" notifications@github.com wrote:

I think Input.Keys should stay as is. Changing that is a much bigger deal
than changing the Animation play modes.

Reply to this email directly or view it on GitHubhttps://github.com//pull/1507#issuecomment-38350705
.

@NathanSweet

This comment has been minimized.

Copy link
Member

NathanSweet commented Mar 22, 2014

InputProcessor changes from int to enum type, so all apps break. Enums would be nicer though.

@MobiDevelop

This comment has been minimized.

Copy link
Member

MobiDevelop commented Mar 22, 2014

Whatever you guys want to do is fine. I don't see the problem with the ints though.

@dsaltares

This comment has been minimized.

Copy link
Member

dsaltares commented Mar 22, 2014

Personally, I'm in favour of making Keys, Buttons and all the input things enums rather than ints. Let's make 1.0 as clean as possible.

@MobiDevelop

This comment has been minimized.

Copy link
Member

MobiDevelop commented Mar 22, 2014

Eh, to me 1.0 is just a number. Having everything break every time I update is annoying as shit though.

@dsaltares

This comment has been minimized.

Copy link
Member

dsaltares commented Mar 22, 2014

AFAIK, 1.0 was going to be a major release and the intent was to keep the API stable after that.

@MobiDevelop

This comment has been minimized.

Copy link
Member

MobiDevelop commented Mar 22, 2014

If that is the case we need to formulate an actual plan for the 1.0 release and not just change random things as they happen to be brought up.

@johnnyapol

This comment has been minimized.

Copy link
Member

johnnyapol commented Mar 22, 2014

If we do switch to enums for the keycodes, we could introduce a method like getInt() and pass that to the input processor so it doesn't break.

@MobiDevelop

This comment has been minimized.

Copy link
Member

MobiDevelop commented Mar 22, 2014

Nah, if it changes, it just needs to change.

@jrenner

This comment has been minimized.

Copy link
Member

jrenner commented Mar 23, 2014

I agree with Mobi, if there is a plan formed around this and other similar
changes I can go and do the Input.Keys changes, but it works fine now so I
don't want to do it on a whim

On Sat, Mar 22, 2014 at 11:40 PM, MobiDevelop notifications@github.comwrote:

Nah, if it changes, it just needs to change.


Reply to this email directly or view it on GitHubhttps://github.com//pull/1507#issuecomment-38354728
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.