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

FlxG: Add FlxG.onMobile #1904

Merged
merged 3 commits into from
Aug 21, 2016
Merged

FlxG: Add FlxG.onMobile #1904

merged 3 commits into from
Aug 21, 2016

Conversation

DleanJeans
Copy link
Contributor

Also I renamed isMobile in HTML5FrontEnd to onMobile since it sounds better.

Also rename `isMobile` in HTML5FrontEnd to `onMobile`

private static inline function get_onMobile():Bool
{
if (onMobile == null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the point of this check? Why not make it @:isVar public static var onMobile(get, never):Bool and

private static inline function get_onMobile():Bool {
   return #if js blah #elseif mobile true #else false #end;
}

@DleanJeans DleanJeans changed the title FlxG: Add onMobile FlxG: Add FlxG.onMobile Aug 14, 2016
@DleanJeans DleanJeans closed this Aug 17, 2016
@DleanJeans DleanJeans reopened this Aug 17, 2016
@DleanJeans
Copy link
Contributor Author

DleanJeans commented Aug 17, 2016

Not sure why Travis didn't build. It's been working OK in my project so far.

@MSGhero
Copy link
Member

MSGhero commented Aug 17, 2016

Travis fails every project for the same reason, something weird on cpp and neko.

@DleanJeans
Copy link
Contributor Author

All the builds were successful but still exited with 1?

@MSGhero
Copy link
Member

MSGhero commented Aug 17, 2016

Yeah, if you look closely,

X Error of failed request:  BadRequest (invalid request code or no such operation)
  Major opcode of failed request:  147 (GLX)
  Minor opcode of failed request:  168 ()
  Serial number of failed request:  173
  Current serial number in output stream:  173

on Haxe 3.2.0 neko and Haxe dev neko/cpp for every recent pull request. This pull is fine since all the demos and coverages passed.

@Gama11 Gama11 added this to the 4.2.0 milestone Aug 21, 2016
@Gama11
Copy link
Member

Gama11 commented Aug 21, 2016

Thanks!

I'm not a huge fan of putting even more stuff into FlxG, but I don't really have a better alternative right now and this does seem useful.

The Travis failures are indeed unrelated, I'm noto sure what's causing them yet.

I don't like the formatting of get_onMobile()'s body, cramping everything into one line doesn't make it very readable.

@Gama11 Gama11 merged commit 778891b into HaxeFlixel:dev Aug 21, 2016
Gama11 added a commit that referenced this pull request Aug 21, 2016
Also removed the unnecessary @:isVar.
Aurel300 pushed a commit to larsiusprime/haxeflixel that referenced this pull request Apr 18, 2018
Aurel300 pushed a commit to larsiusprime/haxeflixel that referenced this pull request Apr 18, 2018
Also removed the unnecessary @:isVar.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants