State & settings
AFM_State turns a world object's mutable values into something UI can bind to generically. Each
value type has a component — BPC_State_Boolean, _Float, _Integer, _Name, _Color,
_Trigger, _Drag — and all of them expose a BP_Value event listener through BPI_Value, along
with a title and caption.
A widget therefore binds to "a value" rather than to a specific object. That is why the same
WBP_SettingItem_* widgets serve both world objects and the settings menu: AFM_Settings reuses
exactly the same contract, with BP_Value_Settings_* classes backed by console variables and a save
game instead of by an actor. Adding a new settings entry means adding a preset asset, not touching
the menu.
The contract
Any object implementing BPI_Value exposes:
Value_getEventListener— aBP_Valueobject whoseOnValueUpdateddelegate fires on change.Value_getTitleandValue_getCaption— display text.Value_Reset— return to default.
Typed interfaces (BPI_Value_Boolean, BPI_Value_Float, and so on) add the get and set for each
type.
This is the extension point worth knowing. Implement BPI_Value on your own object and every
existing settings widget will bind to it without modification.