Skip to content

mobile buttons & controls for gms2 (its like @AtesQuik's thing but more stuff)

License

Notifications You must be signed in to change notification settings

kenan238/kenans-controls-gms2

Repository files navigation

Kenan's Controls-GMS2

Inspired from Atesquik controls for PTP by atesquik, it's a bunch of mobile controls for GMS2

(also if you're gonna use this credit me somewhere, doesn't have to be in big text but still somewhere)

Note: Make sure all sprites fed into this library have an origin of 'Middle Centre'

Installation

  • Import YYMPS
  • Add obj_kenancontrols to the first room in your game
  • Read documentation

Documentation

Adding buttons

kcon_add_element("element_id_here", new KConElementHere(...params...));

Saving/loading configuration

kcon_save()
kcon_load()

Getting an element by id

kcon_get("element_id_here")

Element types

KConButton (_sprite: Sprite, _x: Real, _y: Real, _action: Function, _angle: Real, _vkey: KeyboardKey, _hold: Boolean)

Additional comments:

  • _hold defines if it will call _action for every frame the key is pressed, or if it will only run _action on the frame it gets held down

KConAnalog (_sprite: Sprite, _x: Real, _y: Real, _action: Function, _angle: Real, _thumb_sprite: Sprite)

About

mobile buttons & controls for gms2 (its like @AtesQuik's thing but more stuff)

Resources

License

Stars

Watchers

Forks

Packages

No packages published