9 const string WIDGET_VERTICAL_LIST =
"VList";
10 const string WIDGET_SIZE_SCROLL_OFFSET =
"SizeScrollOffset";
11 const string WIDGET_FOCUS_REST =
"BtnFocusRest";
21 [
Attribute(
"0",
UIWidgets.CheckBox,
desc:
"True will automatically set entry limit value by list size and entry size")]
24 [
Attribute(
"10",
UIWidgets.EditBox,
desc:
"Number of item that should be crated to the list, that player is able to see in list")]
70 super.HandlerAttached(w);
138 GetGame().GetWorkspace().SetFocusedWidget(null);
139 GetGame().GetWorkspace().SetFocusedWidget(availableEntry);
243 widget.SetVisible(!
GetGame().InPlayMode());
254 int res =
Math.Ceil(wrapHeight / entryH);
270 float entriesLimit = wrapHeight / entryH;
272 float entryFraction = (entriesLimit -
Math.Floor(entriesLimit));
276 return entryFraction;
315 if (scrollsCount == -1)
318 scrollPos *= scrollsCount;
319 float offset = scrollPos -
Math.Floor(scrollPos);
345 scrollDir =
Math.Clamp(scrollDir, -1, 1);
395 float pos = step / scrollsCount * inputMove;
399 pos =
Math.Clamp(pos, 0, 1);
408 Widget focused =
GetGame().GetWorkspace().GetFocusedWidget();
418 GetGame().GetWorkspace().SetFocusedWidget(w);
432 if (opacityStart != -1)
433 w.SetOpacity(opacityStart);
451 entry.RemoveFromHierarchy();
493 if (nextClampped >= limit)
496 Print(
"scrollStep: " + scrollStep);
515 if (nextClampped < 1)
584 if (entry.IsVisible() && entry.IsEnabled())
ArmaReforgerScripted GetGame()
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void SetupEntryBehavior(Widget entry)
override void HandlerAttached(Widget w)
int m_iEntriesBottomPadding
void FocusFirstAvailableEntry()
Find first available entry and focus it.
ref array< Widget > m_aEntryWidgets
void ScrollList(float step, float input)
void SetScrollbar(SCR_ScrollBarComponent scrollbar)
bool m_bAnimateListAppearing
array< Widget > GetEntryWidgets()
bool m_bAutomaticEntriesLimit
void ScrollOffsetMove(float scrollPos)
Modify offset size to fake scrolling by scroll position.
float m_fAnimationAppearTime
void AccessingHandlers()
Get reference to all needed component for handling.
float ScrollMove(float step, float inputMove)
Widget FirstAvailableEntry()
Return first that is visible and enabled.
override bool OnUpdate(Widget w)
void SetScrollbarVisible(bool visible)
void OpacityAnimation(Widget w, int time, float opacityEnd)
float m_fEntryWidgetHeight
void ScrollWheelMove()
Scroll list based on input action.
float m_iLastScrollPosition
void CreateEntriesWidgets()
Create server entries widget.
void ChangeFocusWithoutAnimation(Widget w)
float EntryFractionFromViewPos(float viewPos, float scrollPos)
SCR_ScrollBarComponent m_Scrollbar
void OnMenuDown()
Check stepping over limit down.
SizeLayoutWidget m_wSizeScrollOffset
void CheckEntrySize()
Get size of widget entry used in list.
int CalculateLimit()
Calulate entry limit number from list size and entry size.
void ActivateScrolling(bool activate)
Activate scrolling with input action.
void StayOnLastEntry()
Kepp focus on last entry on scroll.
float ScrollableEntriesCount()
void ClearServerList()
Clear widgets from server list.
void AnimateEntryOpacity(Widget w, int delay, float animTime, float opacityEnd, float opacityStart=-1)
Setup opacity animation.
void OnMenuUp()
Check stepping over limit up.
void UpdateEntries(bool animated=false)
Fill entries with data.
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
SCR_FieldOfViewSettings Attribute