GithubHelp home page GithubHelp logo

inputhandler's People

Contributors

lazyfalcon avatar

Watchers

 avatar  avatar

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 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.