Negativbild
UI Library
About this mod Author’s original text
Negativbild
Negativbild is a mod for the Northstar Client that implements some UI utilities.
Documentation
There is no generated documentation available yet.
Scrollbars
A scrollbar is a movable slider that is usable in a confined space.
- void function RegisterScrollbar( var scrollbar, void functionref( int x, int y ) callback )
Registers a new scrollbar
The passed vgui element needs to be a CNestedPanel loading scrollbar.res
Scrollbar
{
ControlName CNestedPanel
wide 50
controlSettingsFile "resource/ui/menus/panels/scrollbar.res"
}
- void function SetScrollbarComponentContentHeight( var component, int height )
Update the height of all slider contents.
Scrollable Lists
Scrollable Lists allow representing infinite amounts of data in a list with a smooth scrolling effect.
Scrollable Lists can not be taller than 800 pixels!
- ScrollableList function RegisterScrollableList( var scrollableList, array items, array listeners )
Register a new scrollable list
The passed vgui element needs to be a CNestedPanel loading scrollable_list.res
ScrollableList
{
ControlName CNestedPanel
wide 200
tall 800
}
- void function UpdateScrollableListContent( ScrollableList sl, array contents, int ornull height = null )
Update the contents and optionally height of a list.
- void function ScrollList( ScrollableList sl, int height )
Scroll the slider height amount of pixels down. Negative height scrolls up.
- ScrollbarContentListener function BuildScrollbarContentListener( int event, void functionref( var, ScrollbarContent ) callback )
Build a ScrollbarContentListener struct instance from the parameters.
Structs
Do not change any values directly.
- ScrollableList
| slot | type | description |
| ------------- | ------------------------ | ------------------------------------------------------------------ |
| nodes | array | nodes that are currently in use |
| component | var | the parent vgui element |
| buffer | var | buffer element used for a smooth transition effect at max capacity |
| contents | array | all contents of this list |
| contentOffset | int | first rendered content index |
| fullHeight | int | combined height of all used nodes used for internal purposes |
- ScrollbarContentListener
| slot | type | description |
| -------- | ----------------------------------------- | -------------------------------------------------- |
| event | int | UIE id of for the event that triggers the callback |
| callback | void functionref( var, ScrollbarContent ) | callback executed for this event |
- ScrollbarContent
| slot | type | description |
| ---------------- | ------------------------ | --------------------------------------------------------------------------- |
| string title | string | displayed title for this item |
| int contentIndex | int | index of this item in the array of all contents |
| bool disabled | bool | denotes if this item is disabled |
| SetDisabled | void functionref( bool ) | This function is automatically set up. Use this to disable this item button |
Globals
- global const int SCROLLBAR_ITEM_HEIGHT = 50
Tooltips
Tooltips show a label with extra information when UIE_GET_FOCUS is triggered.
- void function RegisterToolTip( var menu, var tooltip )
Register a tooltip element for a menu. This element will jump to elements that have been registered with AddTooltipToElement. Only one tooltip can be registered per menu.
The tooltip vgui element needs to be a CNestedPanel extending tooltip.res and should by default be invisible:
Tooltip
{
ControlName CNestedPanel
controlSettingsFile "resource/ui/menus/panels/tooltip.res"
visible 0
}
- void function AddTooltipToElement( var elem, string tooltipText, int width = 0 )
Register a tooltip for an element. Make sure a registered tooltip exists on the same menu as elem.
The elem vgui element should be of a type that receives the UIE_GET_FOCUS by hovering like buttons.
Dropdown
Opens a submenu containing a ScrollableL
Install & use Install: Northstar client mod
- Install the Northstar client first (the open-source community client for Titanfall 2; its release page provides an installer). It loads the mods.
- Unzip the archive from playbuff and put its contents into the Northstar/mods/ folder inside your Titanfall2 directory.
- Start the game through NorthstarLauncher.exe — the console lists the mods it loaded.
Northstar is for private servers and custom content; do not use it to connect to official servers.