gui_mouse_focus(3alleg4)

✨ NAME ✨

gui_mouse_focus β€” the little global that tells you if the input focus follows your mouse pointer around πŸ’–

It lives in the Allegro game programming library, bestie. πŸŽ€


🌸 SYNOPSIS 🌸

#include <allegro.h>

extern int gui_mouse_focus;

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so picture this: you've got a dialog open, your cursor is vibing somewhere on screen, and the question is β€” does the focus chase the mouse, or does the mouse have to earn it? πŸ‘€

If gui_mouse_focus is set, then yes bestie, the input focus literally follows the mouse pointer around the dialog. Wherever the pointer goes, that's where the focus goes. Main character energy, no clicking required. πŸ’…

Otherwise β€” if it's not set β€” a click is required to move the focus. The pointer can wander all it wants; nothing happens until you commit. 🫢

ngl this is one of those tiny globals that quietly changes how the whole dialog feels, so set it on purpose, not by accident. 😭

and that's the whole page, bestie β€” short and iconic, fr fr. 🌈

This was pulled straight out of the Allegro manual for gui_mouse_focus(3alleg4), version 4.4.3. That's the source and the version, and it's also your cute little sign-off. mwah πŸ’œβœ¨