Открыть боковую панель
OpenXRay
xray-16
Коммиты
2ade51c9
Коммит
2ade51c9
создал
Авг 12, 2023
по автору
xottab-duty
Просмотр файлов
Ability to fetch contextual actions from Lua
владелец
57476246
Изменения
1
Скрыть пробелы
Построчно
Рядом
src/xrEngine/key_binding_registrator_script.cpp
Просмотр файла @
2ade51c9
...
...
@@ -7,6 +7,7 @@
// clang-format off
SCRIPT_EXPORT
(
KeyBindings
,
(),
{
class
EnumGameActionsContexts
{};
class
EnumGameActions
{};
class
KeyBindingRegistrator
{};
...
...
@@ -14,6 +15,17 @@ SCRIPT_EXPORT(KeyBindings, (),
module
(
luaState
)
[
def
(
"dik_to_bind"
,
+
[](
int
dik
)
->
int
{
return
GetBindedAction
(
dik
);
}),
def
(
"dik_to_bind"
,
+
[](
int
dik
,
int
ctx
)
->
int
{
return
GetBindedAction
(
dik
,
(
EKeyContext
)
ctx
);
}),
class_
<
EnumGameActionsContexts
>
(
"key_bindings_context"
)
.
enum_
(
"context"
)
[
value
(
"undefined"
,
int
(
EKeyContext
::
Undefined
)),
value
(
"ui"
,
int
(
EKeyContext
::
UI
)),
value
(
"pda"
,
int
(
EKeyContext
::
PDA
)),
value
(
"talk"
,
int
(
EKeyContext
::
Talk
))
],
class_
<
EnumGameActions
>
(
"key_bindings"
)
.
enum_
(
"commands"
)
[
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать