cannot convert from 'string' to 'TaleWorlds.Localization.TextObject

Users who are viewing this thread

This is my first time creating a mod. I'm having a hard time learning to mod for Bannerlord.

I'm trying to do some tutorials to be able to change the Gauntlet UI, but I'm stuck in the error below.

cannot convert from 'string' to 'TaleWorlds.Localization.TextObject

Here is the code:
[ViewModelMixin]
public class ExampleMixin: BaseViewModelMixin<MapNavigationVM>
{
[DataSourceProperty] public bool IsExampleButtonEnabled => true;
[DataSourceProperty] public HintViewModel ExampleButtonHint => new HintViewModel("Example button");

public ExampleMixin(MapNavigationVM vm): base(vm) {}

[DataSourceMethod]
public void ExecuteOpenExample()
{
// open example panel
}
}

This error is regarding the "Example button" part in line 5

I got this code from https://github.com/shdwp/UIExtenderLib/wiki

Can anyone help me with this or maybe share another tutorial?
 
Back
Top Bottom