Improve the ordering logic for applicable input handlers in input config.
This commit is contained in:
@@ -30,6 +30,7 @@ namespace Cryville.Crtr.Config {
|
|||||||
public InputProxy proxy;
|
public InputProxy proxy;
|
||||||
readonly Dictionary<Identifier, InputConfigPanelEntry> _entries = new Dictionary<Identifier, InputConfigPanelEntry>();
|
readonly Dictionary<Identifier, InputConfigPanelEntry> _entries = new Dictionary<Identifier, InputConfigPanelEntry>();
|
||||||
|
|
||||||
|
int _applicableEntries;
|
||||||
Identifier _sel;
|
Identifier _sel;
|
||||||
int _targetDim;
|
int _targetDim;
|
||||||
PhysicalDimension? _targetPDim;
|
PhysicalDimension? _targetPDim;
|
||||||
@@ -45,6 +46,7 @@ namespace Cryville.Crtr.Config {
|
|||||||
CallHelper.Purge(m_deviceList);
|
CallHelper.Purge(m_deviceList);
|
||||||
_consumer.EnumerateEvents(ev => { });
|
_consumer.EnumerateEvents(ev => { });
|
||||||
_recvsrcs.Clear();
|
_recvsrcs.Clear();
|
||||||
|
_applicableEntries = 1;
|
||||||
AddSourceItem(null);
|
AddSourceItem(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,7 +145,7 @@ namespace Cryville.Crtr.Config {
|
|||||||
}
|
}
|
||||||
else flag = true;
|
else flag = true;
|
||||||
btn.interactable = flag;
|
btn.interactable = flag;
|
||||||
obj.transform.SetSiblingIndex(flag ? 1 : m_deviceList.childCount - 1);
|
obj.transform.SetSiblingIndex(flag ? _applicableEntries++ : m_deviceList.childCount - 1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
obj.transform.SetSiblingIndex(0);
|
obj.transform.SetSiblingIndex(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user