GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - CCDirectLink/input-api: CrossCode mod which allows other mods to add rebindable key bindings.

BranchesTags
Open more actions menu

Latest commit

 

History

10 Commits
10 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
ccmod.json
ccmod.json
 
 
pack.sh
pack.sh
 
 
package.json
package.json
 
 
postload.js
postload.js
 
 

Repository files navigation

input-api

go to the releases page

This mod allows other mods to add rebindable key bindings.

Guide for modders

Adding your input actions is incredibly simple. Firstly, you have to define an option in sc.OPTIONS_DEFINITION (as you normally would) which will be written to the save file and show up in the "Controls" tab:

// it is recommended to do this in either `postload` or `prestart`
sc.OPTIONS_DEFINITION['keys-jump'] = {
  type: 'CONTROLS',
  init: { key1: ig.KEY.CTRL, key2: undefined },
  cat: sc.OPTION_CATEGORY.CONTROLS,
};

And after that you have to add a localized label for your key binding:

// there are other ways to do this, but here is the simplest
// you have to put this in `main`
ig.lang.labels.sc.gui.options.controls.keys.jump = 'Jump';

A good example of using this mod can be seen in the Jetpack mod.

About

CrossCode mod which allows other mods to add rebindable key bindings.

Topics

ccmodcrosscodemod

Resources

Readme
MIT license
Activity
Custom properties

Stars

6 stars

Watchers

1 watching

Forks

2 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.