mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-25 22:18:34 +01:00
allow changing auto nav mode value
This commit is contained in:
parent
76cb94bb34
commit
9df1b05bee
2 changed files with 5 additions and 3 deletions
|
@ -31,8 +31,7 @@ namespace MLEM.Ui {
|
|||
public bool HandleKeyboard = true;
|
||||
public bool HandleTouch = true;
|
||||
public bool HandleGamepad = true;
|
||||
|
||||
public bool IsAutoNavMode { get; private set; }
|
||||
public bool IsAutoNavMode;
|
||||
|
||||
public UiControls(UiSystem system, InputHandler inputHandler = null) {
|
||||
this.System = system;
|
||||
|
|
|
@ -237,7 +237,7 @@ namespace MLEM.Ui {
|
|||
};
|
||||
}
|
||||
|
||||
public void SelectElement(Element element) {
|
||||
public void SelectElement(Element element, bool? autoNav = null) {
|
||||
if (this.SelectedElement == element)
|
||||
return;
|
||||
|
||||
|
@ -247,6 +247,9 @@ namespace MLEM.Ui {
|
|||
this.System.OnElementSelected?.Invoke(element);
|
||||
this.SelectedElement = element;
|
||||
this.System.OnSelectedElementChanged?.Invoke(element);
|
||||
|
||||
if (autoNav != null)
|
||||
this.System.Controls.IsAutoNavMode = autoNav.Value;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue