Открыть боковую панель
OpenXRay
xray-16
Коммиты
07fbd105
Коммит
07fbd105
создал
Авг 10, 2023
по автору
xottab-duty
Просмотр файлов
xrEngine/xr_level_controller.h: IsBinded now also supports contextual search
владелец
0335f95e
Изменения
2
Скрыть пробелы
Построчно
Рядом
src/xrEngine/xr_level_controller.cpp
Просмотр файла @
07fbd105
...
...
@@ -602,13 +602,15 @@ game_action* ActionNameToPtr(pcstr name)
return
nullptr
;
}
bool
IsBinded
(
EGameActions
action_id
,
int
dik
)
bool
IsBinded
(
EGameActions
action_id
,
int
dik
,
EKeyContext
context
/*= EKeyContext::Undefined*/
)
{
key_binding
*
binding
=
&
g_key_bindings
[
action_id
];
for
(
u8
i
=
0
;
i
<
bindtypes_count
;
++
i
)
{
if
(
binding
->
m_keyboard
[
i
]
&&
binding
->
m_keyboard
[
i
]
->
dik
==
dik
)
return
true
;
if
(
binding
->
m_action
->
key_context
==
context
)
return
true
;
}
return
false
;
}
...
...
src/xrEngine/xr_level_controller.h
Просмотр файла @
07fbd105
...
...
@@ -194,7 +194,7 @@ ENGINE_API int KeynameToDik(pcstr name);
ENGINE_API
keyboard_key
*
KeynameToPtr
(
pcstr
name
);
ENGINE_API
keyboard_key
*
DikToPtr
(
int
dik
,
bool
safe
);
ENGINE_API
bool
IsBinded
(
EGameActions
action_id
,
int
dik
);
ENGINE_API
bool
IsBinded
(
EGameActions
action_id
,
int
dik
,
EKeyContext
context
=
EKeyContext
::
Undefined
);
ENGINE_API
int
GetActionDik
(
EGameActions
action_id
,
int
idx
=
-
1
);
ENGINE_API
EGameActions
GetBindedAction
(
int
dik
,
EKeyContext
context
=
EKeyContext
::
Undefined
);
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать