Skip to content

Add a mod input controls API #29

Description

@psyGamer

Provide a way for mods to create controls (VirtualButtons, etc.) and automatically add them to the controller config.
They should probably be namespaced under mod ID to prevent conflicts.

I'm not sure how they would be defined. Maybe part as mod settings (which would need to be implemented first) or completely separate like in Vanilla.

When going with option 2, it could look something like this (inspired by Everest):

Module Class:

public override Type ControlsType => typeof(MyModControls);
public static MyModControls Controls => (MyModControls) Instance._Settings;

MyModControls.cs:

[ModControl(Default = [new(Keys.F7)])] // NOTE: I'm not so sure about the "ModControl" name..
public static readonly VirtualButton SaveState = new("SaveState");

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions