mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-20 02:15:00 +01:00
Merge branch 'master' into feat/renderers-cleanup
This commit is contained in:
@@ -640,8 +640,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