jujuadams / input_legacy Goto Github PK
View Code? Open in Web Editor NEWNo-frills input management library for GameMaker
License: MIT License
No-frills input management library for GameMaker
License: MIT License
The situation I'm thinking of is nested UI navigation. Imagine we have an in-game menu, and two verbs to go with that menu 'Select' and 'Back'. Now let's say I'm looking at the options menu and I've made some changes, and then I press the Back button. I want to confirm that the user doesn't want to save their changes, so I pop up a dialog over the options menu, asking if the want to save their changes. The dialog is checking the 'Select' verb for Yes and 'Back' verb for No.
The problem is, the options menu is also checking the 'Select' and 'Back' verbs for its own input logic! So what I want is something like:
input_redirect_verb(old_verb, new_verb)
Which, for the above example, I might call like so: input_redirect_verb("Select", "Select_Dialog")
.
After calling input_redirect_verb
a subsequent call to input_check("Select")
would no longer return true when whatever real input was mapped to "Select" is pressed. Instead, input_check("Select_Dialog")
would return true.
The second part of this would ideally be an input_undo_redirect(current_verb)
, which would basically reverse whatever old_verb got mapped to current_verb. This is just a nice to have, as I could call input_redirect_verb("Select_Dialog", "Select")
myself, but it would be nice for re-usability purposes to not have to keep track of how I got to the current verb mapping (so that a confirmation dialog box could be re-used from anywhere without me tracking the redirections myself).
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.