Giter Site home page Giter Site logo

context-controls's People

Contributors

vocksel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

hms-junk

context-controls's Issues

Add a way for hooking up mobile touch controls

I didn't end up coding this in because it's hard to think up a generic solution.

We need something that plays well both with plain old Roblox guis, and also with Roact. What I ended up doing in my game was just referencing a created action's callback from my Roact events, which works fine.

I think there should be an API to hook up a gui with an action, and manage everything to do with activation, but for Roact we need something different, since we're not really dealing with guis.

Expose Roblox's TouchGui

This would allow the user to easily work with the existing buttons. In my case, I positioned my mobile buttons relative to the existing jump button so that everything lines up nicely. This is especially important because the TouchGui's buttons change size depending on the display.

Having the TouchGui exposed so you don't have to trudge through PlayerModule manually would be handy for the end-user. I think we should have the following API:

ContextControls.getTouchGui()
Returns Players.LocalPlayer.PlayerGui.TouchGui, or nil if not on a touch display

ContextControls.getJumpButton()
Returns TouchGui.TouchControlFrame.JumpButton, if the TouchGui exists

Dealing with the thumbstick in any way seems like it would be very difficult. The player has, as of writing this, 4 different movement options, ranging from thumbsticks to dpads. These controllers do not seem to have a consistent way to grab the gui they use. Might be better off just skipping the thumbstick

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.