Files
Mike Nelson e01a5359ac Scpui API for Control Config (#5305)
* read access to controls

* Early draft of checking keypresses in scpui

* detangle some code and prepare it for API usage

* API access to the core methods required

* move these checks into the UI methods

* comment

* fix bugs

* be smarter

* Need this stuff, too

* some more presets work

* unify func naming scheme

* cleanup and clarifications

* get detect keypress working

* allow searching and creating new presets based on current controls

* address feedback

* return nil if no preset is matched

* use the builtin methods which do the same thing, but slightly cleaner

* typo
2023-04-07 12:02:13 -04:00

29 lines
528 B
C++

#pragma once
#include "controlconfig/controlsconfig.h"
#include "scripting/ade_api.h"
namespace scripting {
namespace api {
struct control_h {
int control;
control_h();
explicit control_h(int l_control);
CCI* getControl() const;
conflict* getConflict() const;
int getIndex() const;
};
struct preset_h {
int preset;
preset_h();
explicit preset_h(int l_preset);
CC_preset* getPreset() const;
};
DECLARE_ADE_OBJ(l_Control, control_h);
DECLARE_ADE_OBJ(l_Preset, preset_h);
} // namespace api
} // namespace scripting