Class BUTRViewModelOverrideAttribute
- Namespace
- Bannerlord.UIExtenderEx.Attributes
- Assembly
- Bannerlord.UIExtenderEx.dll
Marks a mixin method to intercept and override an instance method on the extended host ViewModel.
The override method signature must accept all parameters of the target host method, followed by an additional
delegate parameter (original) matching the target method's parameter list. Calling original invokes
the next chained override in registration order or the original host implementation once the chain completes.
Omitting the invocation suppresses subsequent overrides and the original host method body.
Only instance methods returning void and containing no ref or out parameters can be intercepted. Overrides apply across all caller invocations (Gauntlet prefab command bindings, hotkeys, and direct engine calls) on ViewModel instances where the mixin is enabled.
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public sealed class BUTRViewModelOverrideAttribute : Attribute
- Inheritance
-
BUTRViewModelOverrideAttribute
- Inherited Members
Examples
[BUTRViewModelOverride(nameof(OptionsVM.ExecuteDone))]
private void ExecuteDone(Action original) => _modOptions.ExecuteDoneInternal(false, original);
Constructors
BUTRViewModelOverrideAttribute(string)
Initializes a new instance of BUTRViewModelOverrideAttribute targeting the specified method.
public BUTRViewModelOverrideAttribute(string methodName)
Parameters
methodNamestringThe name of the host ViewModel method to intercept.
Properties
MethodName
Gets the name of the host ViewModel method intercepted by this override.
public string MethodName { get; }
Property Value
This page was last modified at 10/05/2026 13:34:58 +03:00 (UTC).
Commit Message
Author: Vitalii Mikhailov
Commit: f3b725a97c3f299c20e56b5f206e27142ec15edd
* Added C# Auto-Generated XML prefab compilation for patched and dynamic movies, matching vanilla UI performance
* Added name-based property binding fallback for ViewModel subtypes not declared on the parent
* Improved unparseable prefab error logging with name and file details
* Fixed game crash with 3-segment attribute paths
* Added Bannerlord.UIExtenderE...