Открыть боковую панель
OpenXRay
xray-16
Коммиты
95666018
Коммит
95666018
создал
Авг 10, 2023
по автору
xottab-duty
Просмотр файлов
Added helper functions to determine input type (gamepad or keyboard & mouse)
Reduces code length
владелец
07fbd105
Изменения
2
Скрыть пробелы
Построчно
Рядом
src/xrEngine/xr_input.h
Просмотр файла @
95666018
...
...
@@ -159,7 +159,10 @@ public:
bool
IsControllerAvailable
()
const
{
return
!
controllers
.
empty
();
}
void
EnableControllerSensors
(
bool
enable
);
auto
GetCurrentInputType
()
{
return
currentInputType
;
}
auto
GetCurrentInputType
()
const
{
return
currentInputType
;
}
auto
IsCurrentInputTypeController
()
const
{
return
GetCurrentInputType
()
==
InputType
::
Controller
;
}
auto
IsCurrentInputTypeKeyboardMouse
()
const
{
return
GetCurrentInputType
()
==
InputType
::
KeyboardMouse
;
}
public:
void
ExclusiveMode
(
const
bool
exclusive
);
bool
IsExclusiveMode
()
const
;
...
...
src/xrGame/UIDialogHolder.cpp
Просмотр файла @
95666018
...
...
@@ -225,7 +225,7 @@ void CDialogHolder::OnFrame()
{
m_b_in_update
=
true
;
if
(
GetUICursor
().
IsVisible
()
&&
pInput
->
Get
CurrentInputType
()
==
CInput
::
Controller
)
if
(
GetUICursor
().
IsVisible
()
&&
pInput
->
Is
CurrentInputTypeController
()
)
GetUICursor
().
UpdateAutohideTiming
();
CUIDialogWnd
*
wnd
=
TopInputReceiver
();
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать