Why your custom widget might not respond to mouse input, how synced functions expose enemy information fairly, and the simple fixes that get a widget working.
The MouseMove callin in the Spring engine fires only when a mouse button is clicked and held. If your widget is not responding to cursor movement, check a few things. First, open the F11 widget menu and verify the widget appears in green. Green means loaded and active. Second, make sure your widget name does not clash with another loaded widget. BAR silently ignores duplicates. Third, check the infolog for load errors before assuming the code is wrong.
The ownership logic for MouseMove lives in barwidgets.lua around lines 1350-1388. The "MouseMove requires a clicked button" behavior is intentional. It prevents widgets from consuming every mouse move event and bogging down frame rates.
BAR uses synced read functions to expose information that players would normally see through the game interface. GetUnitHealth returns enemy health if you have sight on the unit. GetPlayerInfo returns player nicknames. This is not a security gap. It is the engine being transparent about what information is available during normal play.
If you are writing a widget that needs to display or process unit data, these functions are the standard access path. You are not breaking anything by using them. Every official widget does.
When a widget does not work, the sequence is always the same. Check infolog for Lua syntax errors. Confirm the widget appears green in the F11 menu. Verify the widget name is unique. Test the callin with a minimal print statement before adding complex logic. Most widget issues are name conflicts or silent load failures, not bugs in the code itself.
BAR ships with a rich widget ecosystem because the community contributes openly. If you build something useful, share the code. The barwidgets.lua file is not a locked black box. It is a living document that players read, modify, and improve every week.
"Crd is the first really comfortable community I have been a part of. Everyone is nice and kind, the atmosphere is relaxed, and I am not getting yelled at for not being optimal."