fix: ratolí visible en fullscreen
This commit is contained in:
@@ -245,8 +245,7 @@ void VectorText::render_centered(const std::string& text, const Punt& centre_pun
|
|||||||
// restant la meitat de les dimensions del punt central
|
// restant la meitat de les dimensions del punt central
|
||||||
Punt posicio_esquerra = {
|
Punt posicio_esquerra = {
|
||||||
centre_punt.x - (text_width / 2.0f),
|
centre_punt.x - (text_width / 2.0f),
|
||||||
centre_punt.y - (text_height / 2.0f)
|
centre_punt.y - (text_height / 2.0f)};
|
||||||
};
|
|
||||||
|
|
||||||
// Delegar al mètode render() existent
|
// Delegar al mètode render() existent
|
||||||
render(text, posicio_esquerra, escala, spacing, brightness);
|
render(text, posicio_esquerra, escala, spacing, brightness);
|
||||||
|
|||||||
@@ -32,15 +32,13 @@ void setForceHidden(bool force) {
|
|||||||
|
|
||||||
if (force) {
|
if (force) {
|
||||||
// Entrando en modo oculto forzado: ocultar cursor inmediatamente
|
// Entrando en modo oculto forzado: ocultar cursor inmediatamente
|
||||||
if (cursor_visible) {
|
|
||||||
SDL_HideCursor();
|
SDL_HideCursor();
|
||||||
cursor_visible = false;
|
cursor_visible = false;
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// Saliendo de modo oculto forzado: mostrar cursor y resetear temporizador
|
// Saliendo de modo oculto forzado: NO mostrar cursor automáticamente
|
||||||
SDL_ShowCursor();
|
// El cursor permanece oculto hasta que haya movimiento de ratón (handleEvent)
|
||||||
cursor_visible = true;
|
|
||||||
last_mouse_move_time = SDL_GetTicks(); // Resetear temporizador
|
last_mouse_move_time = SDL_GetTicks(); // Resetear temporizador
|
||||||
|
// cursor_visible permanece false - handleEvent lo cambiará al detectar movimiento
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user