From 4b70be70487628d5831eec98e64cecdeb4a2037c Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Thu, 14 Aug 2025 20:54:29 -0500 Subject: [PATCH] Fix and improve `ButtonMenuAction` doc comment --- src/widgets.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/widgets.rs b/src/widgets.rs index 15af5b0..b4b988b 100644 --- a/src/widgets.rs +++ b/src/widgets.rs @@ -83,10 +83,14 @@ struct MarkerGameOver; #[derive(Component)] struct MarkerHUD; -/// Action specifier for the game-over menu's buttons. +/// Action specifier for the buttons on the menus. /// -/// Attach this component to a button and [`PluginGameOver`] will use it to -/// decide what to do when that button is pressed. +/// Instead of holding function pointers for use as callbacks, I'm doing enum- +/// dispatch. Add a variant according to what action the button press should +/// trigger. +/// +/// Only [`PluginGameMenu`] and [`PluginGameOver`] will use it to this +/// component. There is no always-on, global system. #[derive(Component)] enum ButtonMenuAction { ToMainMenu,