vocksel / context-controls Goto Github PK
View Code? Open in Web Editor NEWWrapper for ContextActionService with an easy to use API
License: MIT License
Wrapper for ContextActionService with an easy to use API
License: MIT License
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.