17 protected ref array<ref SCR_ActionsToolbarItemEditorUIComponent> m_aItemLayouts;
26 protected ref map<Widget, SCR_BaseEditorAction>
m_Actions =
new map<Widget, SCR_BaseEditorAction>();
35 int itemLayoutCount = m_aItemLayouts.Count();
36 if (itemLayoutCount == 0)
40 m_ItemLayout = m_aItemLayouts[0].m_Layout;
43 for (
int i; i < itemLayoutCount; i++)
45 if (action.GetActionType() == m_aItemLayouts[i].m_ActionType)
47 m_ItemLayout = m_aItemLayouts[i].m_Layout;
60 actionItem.SetAction(action, itemWidget);
62 itemWidget.SetName(action.Type().ToString());
68 override protected void ShowEntries(Widget contentWidget,
int indexStart,
int indexEnd)
71 for (
int i = indexStart; i < indexEnd; i++)
83 else if (i > indexStart && i < indexEnd - 1)
98 for (
int i = count - 1; i >= 0; i--)
101 if (group != prevGroup)
111 int debugCount = DiagMenu.GetValue(
SCR_DebugMenuID.DEBUGUI_EDITOR_GUI_TOOLBAR_FILL);
112 if (count > 0 && debugCount > 0)
114 for (
int i; i < debugCount; i++)
123 m_Pagination.SetEntryCount(count);
143 override bool OnClick(Widget w,
int x,
int y,
int button)
145 super.OnClick(w, x, y, button);
155 SCR_ActionsToolbarEditorUIComponent linkedComponent = SCR_ActionsToolbarEditorUIComponent.Cast(m_LinkedComponent);
157 linkedComponent.m_RepeatAction = action;
178 array<SCR_BaseEditorAction> actions = {};
184 toolbarAction.OnInit(
this);
190 placingManager.GetOnSelectedPrefabChange().Insert(
Refresh);
195 editorManager.GetOnCanEndGameChanged().Insert(
Refresh);
196 editorManager.GetOnLimitedChange().Insert(
Refresh);
202 gameMode.GetOnGameModeEnd().Insert(
Refresh);
204 SCR_NightModeGameModeComponent nightModeComponent = SCR_NightModeGameModeComponent.Cast(gameMode.FindComponent(SCR_NightModeGameModeComponent));
205 if (nightModeComponent)
209 super.HandlerAttachedScripted(w);
215 super.HandlerDeattached(w);
220 array<SCR_BaseEditorAction> actions = {};
226 toolbarAction.OnExit(
this);
232 placingManager.GetOnSelectedPrefabChange().Remove(
Refresh);
237 editorManager.GetOnCanEndGameChanged().Remove(
Refresh);
238 editorManager.GetOnLimitedChange().Remove(
Refresh);
244 gameMode.GetOnGameModeEnd().Remove(
Refresh);
246 SCR_NightModeGameModeComponent nightModeComponent = SCR_NightModeGameModeComponent.Cast(gameMode.FindComponent(SCR_NightModeGameModeComponent));
247 if (nightModeComponent)