Показать сообщение отдельно

  #3  
Старый 04.07.2022, 19:10
RedHolms
Постоянный
Регистрация: 04.06.2020
Сообщений: 620
С нами: 3127813

Репутация: 133


По умолчанию

Это только ПРИМЕР, его ты интегрируешь в свой код

C++:





Код:
// куда-нибудь
static
bool
isCursorActiveValue
=
true
;
static
void
showCursor_impl
(
bool
v
)
{
samp
::
RefGame
(
)
->
SetCursorMode
(
v
?
samp
::
CURSOR_LOCKCAM
:
samp
::
CURSOR_NONE
,
!
v
)
;
if
(
!
v
)
samp
::
RefGame
(
)
->
ProcessInputEnabling
(
)
;
}
void
showCursor
(
bool
show
)
{
if
(
show
)
{
showCursor_impl
(
true
)
;
ImGui
::
GetIO
(
)
.
ConfigFlags
&=
~
ImGuiConfigFlags_NoMouseCursorChange
;
}
else
if
(
isCursorActiveValue
)
{
showCursor_impl
(
false
)
;
ImGui
::
GetIO
(
)
.
ConfigFlags
|=
ImGuiConfigFlags_NoMouseCursorChange
;
ImGui
::
SetMouseCursor
(
ImGuiMouseCursor_None
)
;
}
isCursorActiveValue
=
show
;
}
// в хуке Present
if
(
ImguiActive
(
)
)
{
ImGui_ImplDX9_NewFrame
(
)
;
ImGui_ImplWin32_NewFrame
(
)
;
ImGui
::
NewFrame
(
)
;
ImguiDraw
(
)
;
ImGui
::
EndFrame
(
)
;
ImGui
::
Render
(
)
;
ImGui_ImplDX9_RenderDrawData
(
ImGui
::
GetDrawData
(
)
)
;
}
showCursor
(
ImguiMouseActive
(
)
)
;
 
Ответить с цитированием