Manages the remapping UI, binding data from the LemmingShepherd and allowing runtime editing of relationship parameters such as min/max bounds, curves, and role-to-lemming assignments. Users can experiment with settings before committing changes via an Apply button.
More...
Inherits MonoBehaviour.
|
|
void | MappingPaneSubscriptions () |
| | Subscribes UI events and initializes the first refresh.
|
|
|
void | Start () |
| | Initializes UI lists and hooks up control pane button callbacks.
|
|
void | PopulateRelationships () |
| | Instantiates and binds each relationship row based on LemmingShepherd.ValidRelationships.
|
|
void | PopulateLemmings () |
| | Instantiates and binds each lemming row based on LemmingShepherd.ValidLemmings.
|
| void | OnRelationshipSelected (LemmingUIRelationshipDataRow row) |
| | Called when a relationship row's 'Remap' button is clicked. Loads the selected relationship into the mapping pane for editing.
|
|
void | RefreshMappingPane () |
| | Reads all remapping inputs, performs a live RelationshipPreview, and writes every output label in one cohesive pass.
|
|
void | PopulateMetricOptions () |
| | Populates stub metric-setting rows; replace with real data when ready.
|
|
void | ApplyMetricSetting (LemmingRelationSetting settings, MetricSettingInfo updated) |
|
void | PopulateCurveDropdown () |
| | Populate the curve‐type dropdown with all the names in LemmingCurveType.
|
|
void | PopulateLemmingRemappingOptions () |
| | Populates role-mapping rows, limiting choices to the current herd snapshot.
|
| void | HandleRoleChanged (string role, string newName) |
| | Handles when a user changes the assigned lemming for a given role. Updates the local editing info accordingly.
|
|
void | OnApplyMappingClicked () |
| | Commits the current _editingInfo back to the underlying relationship and disables the Apply/Cancel buttons.
|
|
void | OnCancelMappingClicked () |
| | Cancels edits and reloads the original settings into the UI.
|
| IEnumerator | DelayedSample (bool isMin) |
| | Waits delayField seconds then samples the raw value for min/max binding.
|
|
|
RectTransform | relationshipContent |
| | Container Transform under which LemmingUIRelationshipDataRow instances are instantiated.
|
|
LemmingUIRelationshipDataRow | relationshipDataPrefab |
| | Prefab for a single relationship row in the control pane.
|
|
RectTransform | lemmingContent |
| | Container Transform under which LemmingUIDataRow instances are instantiated.
|
|
LemmingUIDataRow | lemmingDataPrefab |
| | Prefab for a single lemming row in the control pane.
|
|
RectTransform | metricOptionsContent |
| | Container Transform under which metric setting rows are instantiated.
|
|
LemmingUIRemappingMetricOption | metricPrefab |
| | Prefab for a single metric option row (e.g. slider, toggle, dropdown).
|
|
RectTransform | remappingLemmingContent |
| | Container Transform under which role-to-lemming mapping rows are instantiated.
|
|
LemmingUIRemappingLemmingRow | lemmingRemappingPrefab |
| | Prefab for a single role mapping row.
|
|
TextMeshProUGUI | remappingOutput |
| | Container for remapping update for raw value.
|
|
TextMeshProUGUI | remappingNormal |
| | Container for remapping update for normalized value.
|
|
TextMeshProUGUI | remappingCurve |
| | Container for remapping update for curved value.
|
|
TextMeshProUGUI | remappingStatus |
| | Container for remapping update for status.
|
|
TextMeshProUGUI | mappingHeaderName |
| | Text UI for displaying the selected relationship ID.
|
|
TextMeshProUGUI | mappingHeaderDescription |
| | Text UI for displaying the selected relationship description.
|
|
TMP_InputField | delayField |
| | InputField for specifying the delay before min/max sampling.
|
|
Button | setMinButton |
| | Button to initiate sampling the current value as the 'Min' bound.
|
|
Button | setMaxButton |
| | Button to initiate sampling the current value as the 'Max' bound.
|
|
TMP_InputField | manualMinField |
| | InputField to manually enter a minimum bound value.
|
|
TMP_InputField | manualMaxField |
| | InputField to manually enter a maximum bound value.
|
|
TMP_Dropdown | curveDropdown |
| | Dropdown for selecting a predefined curve type.
|
|
Button | applyMappingButton |
| | Button to apply all edits to the relationship.
|
|
Button | cancelMappingButton |
| | Button to cancel edits and revert to original values.
|
|
TextMeshProUGUI | metricType |
| | Text UI for displaying the selected Metric Type.
|
|
TextMeshProUGUI | metricDescription |
| | Text UI for displaying the selected Metric Description.
|
|
LemmingUIRelationshipDataRow | _selectedRow |
|
LemmingRelationshipInfo | _originalInfo |
|
LemmingRelationshipInfo | _editingInfo |
Manages the remapping UI, binding data from the LemmingShepherd and allowing runtime editing of relationship parameters such as min/max bounds, curves, and role-to-lemming assignments. Users can experiment with settings before committing changes via an Apply button.
◆ DelayedSample()
| IEnumerator LemmingUIRemappingController.DelayedSample |
( |
bool | isMin | ) |
|
|
inlineprivate |
Waits delayField seconds then samples the raw value for min/max binding.
- Parameters
-
| isMin | If true, binds to min; otherwise binds to max. |
◆ HandleRoleChanged()
| void LemmingUIRemappingController.HandleRoleChanged |
( |
string | role, |
|
|
string | newName ) |
|
inlineprivate |
Handles when a user changes the assigned lemming for a given role. Updates the local editing info accordingly.
- Parameters
-
| role | Role label (e.g. "Leader"). |
| newName | New lemming name selected by the user. |
◆ OnRelationshipSelected()
Called when a relationship row's 'Remap' button is clicked. Loads the selected relationship into the mapping pane for editing.
- Parameters
-
| row | The selected relationship row. |
The documentation for this class was generated from the following file:
- Assets/Lemmings/Scripts/UI/LemmingUIRemappingController.cs