6 protected ref array<EEditorActionGroup> m_ActionGroups;
9 protected ResourceName m_SeparatorLayout;
13 protected ref array<ref SCR_EditorActionData> m_aActionData = {};
14 protected ref array<ref SCR_BaseEditorAction> m_aShortcuts = {};
15 protected ref map<Widget, SCR_BaseEditorAction> m_Actions =
new map<Widget, SCR_BaseEditorAction>();
22 if (!CreateItem(itemWidget, item))
31 actionItem.SetAction(action, itemWidget);
34 action.SetShortcutRef(
string.Format(
"EditorQuickCommand%1", shortcutIndex + 1));
35 m_aShortcuts.InsertAt(action, shortcutIndex);
41 protected void OnEditorQuickCommand(
int index)
43 if (m_aShortcuts.Count() >=
index)
46 protected void OnEditorQuickCommand1() { OnEditorQuickCommand(1); }
47 protected void OnEditorQuickCommand2() { OnEditorQuickCommand(2); }
48 protected void OnEditorQuickCommand3() { OnEditorQuickCommand(3); }
49 protected void OnEditorQuickCommand4() { OnEditorQuickCommand(4); }
50 protected void OnEditorQuickCommand5() { OnEditorQuickCommand(5); }
51 protected void OnEditorQuickCommand6() { OnEditorQuickCommand(6); }
52 protected void OnEditorQuickCommand7() { OnEditorQuickCommand(7); }
53 protected void OnEditorQuickCommand8() { OnEditorQuickCommand(8); }
54 protected void OnEditorQuickCommand9() { OnEditorQuickCommand(9); }
55 protected void OnEditorQuickCommand10() { OnEditorQuickCommand(10); }
60 override protected void ShowEntries(Widget contentWidget,
int indexStart,
int indexEnd)
67 for (
int i = indexStart; i < indexEnd; i++)
74 else if (i > indexStart && i < indexEnd - 1)
83 override protected void Refresh()
91 for (
int i = count - 1; i >= 0; i--)
93 if (!m_ActionGroups.Contains(
m_aActionData[i].GetAction().GetActionGroup()))
104 for (
int i = count - 1; i >= 0; i--)
107 if (group != prevGroup)
118 int debugCount = DiagMenu.GetValue(
SCR_DebugMenuID.DEBUGUI_EDITOR_GUI_TOOLBAR_FILL);
119 if (count > 0 && debugCount > 0)
121 for (
int i; i < debugCount; i++)
131 m_Pagination.SetEntryCount(count);
140 protected void OnFilterChange(
EEditableEntityState state, set<SCR_EditableEntityComponent> entitiesInsert, set<SCR_EditableEntityComponent> entitiesRemove)
146 override bool IsUnique()
152 override void OnInputDeviceIsGamepad(
bool isGamepad)
156 m_Filter.GetOnChanged().Insert(OnFilterChange);
161 m_Filter.GetOnChanged().Remove(OnFilterChange);
165 super.OnInputDeviceIsGamepad(isGamepad);
169 override bool OnClick(Widget w,
int x,
int y,
int button)
183 override void HandlerAttachedScripted(Widget w)
194 InputManager inputManager =
GetGame().GetInputManager();
195 inputManager.AddActionListener(
"EditorQuickCommand1", EActionTrigger.DOWN, OnEditorQuickCommand1);
196 inputManager.AddActionListener(
"EditorQuickCommand2", EActionTrigger.DOWN, OnEditorQuickCommand2);
197 inputManager.AddActionListener(
"EditorQuickCommand3", EActionTrigger.DOWN, OnEditorQuickCommand3);
198 inputManager.AddActionListener(
"EditorQuickCommand4", EActionTrigger.DOWN, OnEditorQuickCommand4);
199 inputManager.AddActionListener(
"EditorQuickCommand5", EActionTrigger.DOWN, OnEditorQuickCommand5);
200 inputManager.AddActionListener(
"EditorQuickCommand6", EActionTrigger.DOWN, OnEditorQuickCommand6);
201 inputManager.AddActionListener(
"EditorQuickCommand7", EActionTrigger.DOWN, OnEditorQuickCommand7);
202 inputManager.AddActionListener(
"EditorQuickCommand8", EActionTrigger.DOWN, OnEditorQuickCommand8);
203 inputManager.AddActionListener(
"EditorQuickCommand9", EActionTrigger.DOWN, OnEditorQuickCommand9);
204 inputManager.AddActionListener(
"EditorQuickCommand10", EActionTrigger.DOWN, OnEditorQuickCommand10);
210 super.HandlerAttachedScripted(w);
214 override void HandlerDeattached(Widget w)
217 m_Filter.GetOnChanged().Remove(OnFilterChange);
219 super.HandlerDeattached(w);