4 protected const int NO_SORTING = -1;
10 protected int m_CurrentSettingKeyIndex = -1;
11 protected int m_CurrentSettingAlternateKeyIndex = -1;
33 return "gui/layouts/new_ui/options/keybindings_selectors/keybinding_container.layout";
41 GetUApi().SaveInputPresetMiscData();
55 Widget subgroup =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/new_ui/options/keybindings_selectors/keybinding_subgroup.layout", parent);
91 if (!m_KeyWidgetElements.Get(
index))
103 return (m_CurrentSettingKeyIndex != -1 || m_CurrentSettingAlternateKeyIndex != -1);
118 m_CurrentSettingAlternateKeyIndex = -1;
125 if (m_CurrentSettingKeyIndex != -1)
127 foreach (KeybindingElementNew
element : m_KeyWidgetElements.Get(m_CurrentSettingKeyIndex))
128 element.CancelEnteringKeybind();
129 m_CurrentSettingKeyIndex = -1;
135 m_CurrentSettingKeyIndex = -1;
136 m_CurrentSettingAlternateKeyIndex =
key_index;
142 if (m_CurrentSettingAlternateKeyIndex != -1)
144 foreach (KeybindingElementNew
element : m_KeyWidgetElements.Get(m_CurrentSettingAlternateKeyIndex))
145 element.CancelEnteringKeybind();
146 m_CurrentSettingAlternateKeyIndex = -1;
189 if (
element.IsAlternateChanged())
193 if (
input.AlternativeCount() == 0)
194 input.AddAlternative();
226 if (m_CurrentSettingKeyIndex != -1 || m_CurrentSettingAlternateKeyIndex != -1)
229 if (
ua_api.DeterminePressedButton() != 0)
238 for (
int i = 0;
i <
ua_api.DeterminedCount(); ++
i)
247 if (m_CurrentSettingKeyIndex != -1)
250 foreach (KeybindingElementNew
element : m_KeyWidgetElements.Get(m_CurrentSettingKeyIndex))
252 m_CurrentSettingKeyIndex = -1;
254 else if (m_CurrentSettingAlternateKeyIndex != -1)
257 foreach (KeybindingElementNew
elementAlternate : m_KeyWidgetElements.Get(m_CurrentSettingAlternateKeyIndex))
259 m_CurrentSettingAlternateKeyIndex = -1;
268 for (
int i = 0;
i < m_Subgroups.Count();
i++)
274 m_Scroll.VScrollToPos01(0);
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
ServerBrowserMenuNew m_Menu
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
void SwitchSubgroup(int index)
void ClearAlternativeKeybind(int key_index)
void Reset(bool forced=false)
void CreateSubgroups(Widget parent, Input input)
void OnSelectKBPreset(int index)
void StartEnteringAlternateKeybind(int key_index)
ref array< Widget > m_Subgroups
void AddElement(int index, Widget parent, Input input)
bool IsChanged()
is anything changed?
void AddSubgroup(int sort_index, Widget parent, Input input)
void StartEnteringKeybind(int key_index)
void Update(float timeslice)
void ClearKeybind(int key_index)
void KeybindingsContainer(int index, Input input, Widget parent, KeybindingsMenu menu)
void CancelEnteringAlternateKeybind()
void CancelEnteringKeybind()
ref map< int, ref ElementArray > m_KeyWidgetElements
proto native CGame GetGame()