Attachment to a specific menu item of TCastleOnScreenMenu, for example may store a value associated with given menu option, and allow to change it by a slider.
Return the width you will need to display yourself.
Note that this will be asked only from FixItemsRectangles from TCastleOnScreenMenu. So for example TMenuArgument is *not* supposed to return here something based on current TMenuArgument.Value, because we will not query GetWidth after every change of TMenuArgument.Value. Instead, TMenuArgument should return here the width of widest possible Value.
Called when user clicks the mouse when currently selected item has this TMenuAccessory.
Called only if Event.MousePosition is within current Rectangle (place on screen) of this accessory. This Rectangle is also passed here, so you can e.g. calculate mouse position relative to current accessory as (Event.Position[0] - Rectangle.Left, Event.Position[1] - Rectangle.Bottom).
Note that while the user holds the mouse clicked (Event.Pressed <> []), the mouse is "grabbed" by this accessory, and even when the user will move the mouse over other items, they will not receive their MouseDown/Motion messages until user will let the mouse go. This prevents the bad situation when user does MouseDown e.g. on "Sound Volume" slider, slides it to the right and then accidentaly moves the mouse also a little down, and suddenly he's over "Music Volume" slider and he changed the position of "Music Volume" slider.
You can use ParentMenu to call ParentMenu.AccessoryValueChanged.
Called when user moves the mouse over the currently selected menu item and menu item has this accessory.
Just like with MouseDown: This will be called only if Event.Position is within appropriate Rectangle of accessory. You can use ParentMenu to call ParentMenu.AccessoryValueChanged.