BlueAmulet / cclite

A ComputerCraft Emulator written in Love2D
Other
14 stars 8 forks source link

Mobile "control pad" #5

Closed dmarcuse closed 10 years ago

dmarcuse commented 10 years ago

This PR will add a "control pad" for mobile users. It can be enabled and remapped in the config file, but by default it will use WASD and enter.

There are 5 "zones" on the control pad: The top - presses key _conf.ctrlPad.top ("w" by default) The bottom- presses key _conf.ctrlPad.bottom ("s" by default) The left - presses key _conf.ctrlPad.left ("a" by default) The right - presses key _conf.ctrlPad.right ("d" by default) The center - presses key _conf.ctrlPad.center ("return" by default)

This is one of my first times using LOVE, so I'm not very good and the code may be messy, but here's a screenshot :P y u no see screenshot

I plan on adding coloring/marking to the circle so its easier to tell what's what, but try it out and see what you think. I recommend trying it in worm.

gamax92 commented 10 years ago

So, I'll accept it. The keys will be changed to arrow keys however, worm can use them anyway.

dmarcuse commented 10 years ago

Fine by me, had just left them as WASD for making sure it sent "char" events as well when appropriate :P