Class PropertyBaseXmlModel
- Namespace
- MCM.Abstractions.Xml
- Assembly
- MCMv5.dll
Common attributes of every property declared in a <Settings> XML block:
Id, DisplayName, Order, HintText, RequireRestart.
public abstract class PropertyBaseXmlModel : IPropertyDefinitionBase, IPropertyDefinitionWithId
- Inheritance
-
PropertyBaseXmlModel
- Implements
- Derived
- Inherited Members
Properties
DisplayName
The display name of the setting in the settings menu.
public string DisplayName { get; set; }
Property Value
HintText
The hint text that is displayed at the bottom of the screen when the user hovers over the setting in the settings menu.
public string HintText { get; set; }
Property Value
Id
public string Id { get; set; }
Property Value
Order
Require restart of the game if the value is changed.
public int Order { get; set; }
Property Value
RequireRestart
Require restart of the game if the value is changed.
public bool RequireRestart { get; set; }
Property Value
Methods
FromXml(XmlNode)
Creates the model matching the element name (Bool, Integer, FloatingInteger, Text, Dropdown).
Returns null for unknown elements and for elements without an Id.
public static PropertyBaseXmlModel? FromXml(XmlNode node)
Parameters
nodeXmlNode
Returns
Read(XmlNode)
Fills the model from the element. Returns false when the element is not valid.
protected virtual bool Read(XmlNode node)
Parameters
nodeXmlNode
Returns
ReadBase(XmlNode)
Reads the attributes shared by all property elements. Returns false when the element has no Id.
protected bool ReadBase(XmlNode node)
Parameters
nodeXmlNode
Returns
This page was last modified at 10/17/2026 18:11:59 +03:00 (UTC).
Commit Message
Author: Vitalii Mikhailov
Commit: 4c11f9b0c8db5363fd147c4f156b8d8151ad53b0
* Mods can declare their settings in their SubModule.xml, which MCM will render if installed.
* A warning is logged when two mods declare settings with the same id
* Updated to UIExtenderEx v3
* Fixed controller tab switching in the options screen landing on the wrong page next to Mod Options
* Fixed Cancel in the options screen undoing MCM changes before the game ask...