inputhandler's People
inputhandler's Issues
Disabling context
As context receives input independent to others, there should be option to disable context.
-
Other interesting idea is to have separate layers of contexts, ie. Game menu is separate layer over gameplay, it should capture all events
-> similar to ui layers, maybe combine them together? -
scoped activation, allocating new contexts could be hard, they could be active/layered only for one action
Pomysły again
- Dodać obsługę xPada
- I może zamiast ifów to różne context handlery, zwłaszcza dla pada
klawisze mogą włączać przecież stany w obiekcie, klawisze mogą te stany włączać, a reszta akcji może mieć do nich dostęp. Tylko teraz modyfikatory wszystko mi psują, bo przysłaniają właściwe mappingi.
Rozwiązaniem jest to żeby modyfikatory nie były brane pod uwagę, a jedynie ustawiały stan w klasie usera. Można im też dać stan repeat.
onKey("shift", [this]{ this->preciseMovement=true; }, [this]{ this->preciseMovement=false; });
onKey("w", [this]{
velocity=50;
if(this->preciseMovement) velocity*=0.1;
});
Ma to więcej sensu, i jest trochę prostsze, z resztą można dać możliwość właczenia takiego zachowania.
Można zrobić też tak że sprawdzamy czy jest taka funkcja z modyfikatorem a jeśli nie to odpalamy, tą bez.
A konteksty mogłyby konsumować input, można je wtedy poukładać w stos i dać opcję dziedziczenia bindingów i wielokrotne bindingi pod klawisz.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.