Class ItemListScroller
Item scroller UI panel component composed of scrollbar, scroll buttons and items list.
Inherited Members
Namespace: DaggerfallWorkshop.Game.UserInterface
Assembly: Assembly-CSharp.dll
Syntax
public class ItemListScroller : Panel, IDisposable
Constructors
| Improve this Doc View SourceItemListScroller(ToolTip, Boolean)
Initializes a new instance of the ItemListScroller using default coordinates preset for use on DF inventory screens. Switches to advanced display of 16 items instead of 4 if user enables enhanced item lists.
Declaration
public ItemListScroller(ToolTip toolTip, bool disableEnhanced = false)
Parameters
Type | Name | Description |
---|---|---|
ToolTip | toolTip | Tool tip class to use if items should display tooltips. |
Boolean | disableEnhanced | If set to |
ItemListScroller(Int32, Int32, Rect, Rect[], TextLabel, ToolTip, Int32, Single, Boolean, Int32, Int32)
Initializes a fully customised new instance of ItemListScroller.
Declaration
public ItemListScroller(int listRows, int listCols, Rect itemListRect, Rect[] itemsRects, TextLabel miscLabelTemplate, ToolTip toolTip = null, int itemMarginSize = 1, float textScale = 1F, bool scroll = true, int miscLabelOffsetDist = 0, int miscLabelOffsetIdx = 0)
Parameters
Type | Name | Description |
---|---|---|
Int32 | listRows | Number of rows of items this list will display at one time. |
Int32 | listCols | Number of items displayed per row. |
Rect | itemListRect | Item list coordinate rect, excluding scrollbar. |
Rect[] | itemsRects | Individual items display coordinate rects. (1 per width*height) |
TextLabel | miscLabelTemplate | Template for misc label: relative position, font, horizontal and vertical alignment, text scale. (defaults: Vector2.zero, Font4, Left, Top, 1) |
ToolTip | toolTip | Tool tip class to use if items should display tooltips. |
Int32 | itemMarginSize | Individual item display margin size. |
Single | textScale | Text scale factor for stack labels. |
Boolean | scroll | True for a scrollable list, false otherwise. |
Int32 | miscLabelOffsetDist | Vertical distance to offset the misc label, 0 to disable. |
Int32 | miscLabelOffsetIdx | Index of column for which to offset the misc label. |
Properties
| Improve this Doc View SourceBackgroundAnimationDelay
Delay in seconds between each frame of animation
Declaration
public float BackgroundAnimationDelay { get; set; }
Property Value
Type | Description |
---|---|
Single |
BackgroundAnimationHandler
Handler for background animations (can't be colour highlighted)
Declaration
public ItemListScroller.ItemBackgroundAnimationHandler BackgroundAnimationHandler { get; set; }
Property Value
Type | Description |
---|---|
ItemListScroller.ItemBackgroundAnimationHandler |
BackgroundColourHandler
Handler for colour highlighting
Declaration
public ItemListScroller.ItemBackgroundColourHandler BackgroundColourHandler { get; set; }
Property Value
Type | Description |
---|---|
ItemListScroller.ItemBackgroundColourHandler |
ForegroundAnimationDelay
Delay in seconds between each frame of animation
Declaration
public float ForegroundAnimationDelay { get; set; }
Property Value
Type | Description |
---|---|
Single |
ForegroundAnimationHandler
Handler for foreground animations (can be colour highlighted)
Declaration
public ItemListScroller.ItemForegroundAnimationHandler ForegroundAnimationHandler { get; set; }
Property Value
Type | Description |
---|---|
ItemListScroller.ItemForegroundAnimationHandler |
Items
Declaration
public List<DaggerfallUnityItem> Items { get; set; }
Property Value
Type | Description |
---|---|
List<DaggerfallUnityItem> |
LabelTextHandler
Handler for misc label text (defaults to top left)
Declaration
public ItemListScroller.ItemLabelTextHandler LabelTextHandler { get; set; }
Property Value
Type | Description |
---|---|
ItemListScroller.ItemLabelTextHandler |
Methods
| Improve this Doc View SourceResetScroll()
Declaration
public void ResetScroll()
Events
| Improve this Doc View SourceOnItemClick
Declaration
public event ItemListScroller.OnItemClickHandler OnItemClick
Event Type
Type | Description |
---|---|
ItemListScroller.OnItemClickHandler |
OnItemHover
Declaration
public event ItemListScroller.OnItemHoverHandler OnItemHover
Event Type
Type | Description |
---|---|
ItemListScroller.OnItemHoverHandler |
OnItemMiddleClick
Declaration
public event ItemListScroller.OnItemMiddleClickHandler OnItemMiddleClick
Event Type
Type | Description |
---|---|
ItemListScroller.OnItemMiddleClickHandler |
OnItemRightClick
Declaration
public event ItemListScroller.OnItemRightClickHandler OnItemRightClick
Event Type
Type | Description |
---|---|
ItemListScroller.OnItemRightClickHandler |