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

Add analog directional input to FlxVirtualPad #3340

Merged
merged 27 commits into from
Jan 29, 2025

Conversation

Geokureli
Copy link
Member

@Geokureli Geokureli commented Jan 22, 2025

  • FlxVirtualStick: Added
  • FlxAnalog: Deprecated for the new FlxVirtualStick
  • FlxVirtualPad: Adds FlxDPadMode.analog, to use a FlxVirtualStick for directional input
  • FlxSpriteUtil: drawCircle now centers the image to the bitmap, if x/y are omitted
  • FlxButton: Added toString and toInt methods to FlxButtonState, deprecate statusAnimations
  • FlxPoint: Added scale, dist, distSquared, distanceTo and distanceSquaredTo overloaded methods
  • FlxMath: Added getElapsedLerp for framerate independate lerping
  • FlxAnalogState: add moved, justMoved, stopped and justStopped getters

@Geokureli Geokureli marked this pull request as ready for review January 22, 2025 03:30
@Geokureli Geokureli added this to the Next Minor Version milestone Jan 23, 2025
@Geokureli Geokureli modified the milestones: Next Minor Version, 6.0.0 Jan 23, 2025
@Geokureli Geokureli changed the base branch from dev to release6 January 23, 2025 23:00
@Geokureli Geokureli merged commit 39e1fcf into HaxeFlixel:release6 Jan 29, 2025
10 checks passed
@Geokureli Geokureli deleted the virtual-stick branch January 29, 2025 23:59
Geokureli added a commit that referenced this pull request Jan 31, 2025
* Fix FlxSpriteGroup origin (#2981)

* update children origins relative to their positions

* add originTransform unit test

* Better framerate independant camera lerping (#2922)

* adjust lerp based on the current frame rate

* better framerate independant camera lerping

* fix error

* remove setter

* docs

* fix default lerp in follow()

* fix typo

* add #2981 and #2922

* Flxstate new (#2733)

* take FlxState constructor instead of FlxState

* add NextState type

* 4.0.5 fixes

* more 4.0.5 fixes

* fix deprecation warnings in unit tests

* take nextState in VCRFrontEnd

* remove @from Instance in InitialState

* use is operator

* improve docs

* rename method

* more docs

* more modular FlxSplash, set _gameJustStarted in FlxGame

* allow splash to be skipped by a switchState call

* touch-ups for #2733 (#3003)

* take FlxState constructor instead of FlxState

* add NextState type

* 4.0.5 fixes

* more 4.0.5 fixes

* fix deprecation warnings in unit tests

* take nextState in VCRFrontEnd

* remove @from Instance in InitialState

* use is operator

* improve docs

* rename method

* more docs

* more modular FlxSplash, set _gameJustStarted in FlxGame

* allow splash to be skipped by a switchState call

* touch-ups

* add #2733

* Remove deprecated features (#3048)

* remove deprecated features

* more removals

* Update FlxCamera.hx

* remove defaultCameras

* Default zoom (#2907)

* add bindScrollPos

* improve SCREEN_BY_SCREEN follow mode

* make cameras suck less when using FlxCamera.defaultZoom <> 1.0

* Replace references to FlxG.camera with this.getDefaultCamera (#3072)

* add getDefaultCamera, stop using FlxG.camera for everything

* more uses of getDefaultCamera

* fix flxpath

* changelog

* Calculate adjustedLerp only when necessary (#3106)

* Calculate adjustedLerp only when necessary

* Skip updateLerp on followLerp <= 0

* replace boundLerp with gt/lt checks

---------

Co-authored-by: George Kurelic <[email protected]>

* style

* 1 line patch? (#3254)

* update haxelib after merge

* Log pos (#3338)

* change logs to include posInfos

* fix flash errors

* D'oh

* update Changelog

* Add analog directional input to FlxVirtualPad (#3340)

* add overloaded scale

* add FlxReadOnlyPoint

* deprecate statusAnimations

* fix drawCircle centering

* Add analog stick to FlxVirtualPad

* fix code climate

* D'oh

* fix coverage

* fix flash

* add distance overloads

* add FlxMath.getFrameLerp

* honor camera in checkInput

* add FlxVirtualStick deprecate FlxAnalog

* rename to getElapsedLerp

* fix multi-touch

* D'oh!

* doc

* add FlxAnalogState helpers

* rename signals, add statuses

* add deadzone

* remove lerp constructor arg

* fix unit test warning

* overload more shit

* 5.10.0

* change 5.10->6

* Remove unused legacy code & defines (#3059)

* Remove legacy code & defines
- Removed `FLX_POST_PROCESS` define &  related code
- Removed references to `openfl_next`, `lime_legacy` &  `next` defines
- Removed Lime & OpenFL version checks that are always true/false due to the current minimum versions

* Removed `legacy` define being set in include.xml

* Re-added `#if !flash` check in `initRenderMethod`

I mistakenly removed the entire code due to it including `lime_legacy`.

* Brought back `undump()` & `canBeDumped` as `refreshBitmap()` & `canBeRefreshed` respectively (old ones are now deprecated)
- Also brought back `onAssetsReload()` & `getBitmapFromSystem()`

* Added missing line breaks

* remove old import

* Remove another deprecated define

* Restored mistakenly-removed define check

* Rename `refreshBitmap()` to `refresh()`

---------

Co-authored-by: George FunBook <[email protected]>

* FlxSave: Replace `FlxSaveStatus.ERROR` with SAVE_ERROR (#3294)

* replace `FlxSaveStatus.ERROR` with SAVE_ERROR

* update changelog

* add link

* Add deprecated  ERROR back

* remove implicit int casts to/from directions (#3308)

* remove implicit int casts to/from directions

* D'oh

* D'oh!

* deprecate operators and fix haxe 4.2.5

* order imports

* remove casts, add explicit cast functions

* fix not() and add tests

* Doc

* doc + tests

* update changelog

* finalize(?) changelog

* enable glsl3 (when openfl does) (#3347)

* update Changelog

* prepare for release

---------

Co-authored-by: 47rooks <[email protected]>
Co-authored-by: rich <[email protected]>
Co-authored-by: DetectiveBaldi <[email protected]>
Co-authored-by: Flainn <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant