mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-20 03:24:58 +01:00
feat(editor): the cursor drawn into the picture, for streams and recordings of the window
View > Cursor drawn into the picture (streams): the system pointer is hidden and ImGui draws its own into the frame, so it shows in a capture of the window (Discord, OBS, the capture of the system), which leaves the system pointer out. Off by default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DDcMn1Q7wdYkbxDUWscNHZ
This commit is contained in:
@@ -624,8 +624,18 @@ void ui_layer::render_hierarchy(){
|
||||
|
||||
void ui_layer::set_cursor(int const Mode)
|
||||
{
|
||||
glfwSetInputMode(m_window, GLFW_CURSOR, Mode);
|
||||
// the cursor drawn into the picture: the one of the system hidden, so only that one shows, also in a capture of the window
|
||||
auto const hidden{Mode == GLFW_CURSOR_NORMAL && m_drawcursor};
|
||||
glfwSetInputMode(m_window, GLFW_CURSOR, hidden ? GLFW_CURSOR_HIDDEN : Mode);
|
||||
m_cursorvisible = Mode != GLFW_CURSOR_DISABLED;
|
||||
if (m_imguiio != nullptr)
|
||||
m_imguiio->MouseDrawCursor = m_drawcursor && m_cursorvisible;
|
||||
}
|
||||
|
||||
void ui_layer::draw_cursor(bool const Draw)
|
||||
{
|
||||
m_drawcursor = Draw;
|
||||
set_cursor(m_cursorvisible ? GLFW_CURSOR_NORMAL : GLFW_CURSOR_DISABLED);
|
||||
}
|
||||
|
||||
void ui_layer::set_progress(std::string const &Text)
|
||||
|
||||
Reference in New Issue
Block a user