# UI

UI label functions.

### Functions

<table><thead><tr><th width="283">Function</th><th width="115.33333333333331">Returns</th><th>Description</th></tr></thead><tbody><tr><td>SetLabel(type: string, label: string)</td><td>null</td><td>Sets the label at a certain location. Valid types: "TopCenter", "TopLeft", "TopRight", "MiddleCenter", "MiddleLeft", "MiddleRight", "BottomLeft", "BottomRight", "BottomCenter".</td></tr><tr><td>SetLabelForTime(type: string, label: string, time: float)</td><td>null</td><td>Sets the label for a certain time, after which it will be cleared.</td></tr><tr><td>SetLabelAll(type: string, label: string)</td><td>null</td><td>Sets the label for all players. Master client only. Be careful not to call this often.</td></tr><tr><td>SetLabelForTimeAll(type: string, label: string, time: float)</td><td>null</td><td>Sets the label for all players for a certain time. Master client only.</td></tr><tr><td>CreatePopup(name: string, title: string, width: int, height: int)</td><td>null</td><td>Creates a new popup. This popup is hidden until shown.</td></tr><tr><td>ShowPopup(name: string)</td><td>null</td><td>Shows the popup with given name.</td></tr><tr><td>HidePopup(name: string)</td><td>null</td><td>Hides the popup with given name.</td></tr><tr><td>ClearPopup(name: string)</td><td>null</td><td>Clears all elements in popup with given name.</td></tr><tr><td>IsPopupActive(name: string)</td><td>bool</td><td>Is the popup active.</td></tr><tr><td>GetPopups()</td><td>List(string)</td><td>Returns a list of all created popup names.</td></tr><tr><td>AddPopupLabel(name: string, label: string)</td><td>null</td><td>Adds a text row to the popup with label as content.</td></tr><tr><td>AddPopupButton(popupName: string, buttonName: string, buttonText: string)</td><td>null</td><td>Adds a button row to the popup with given button name and display text. When button is pressed, OnButtonClick is called in Main with buttonName parameter.</td></tr><tr><td>AddPopupButtons(popupName: string, buttonNames: List, buttonTitles: List)</td><td>null</td><td>Adds a list of buttons in a row to the popup.</td></tr><tr><td>AddPopupBottomButton(popupName: string, buttonName: string, buttonText: string)</td><td>null</td><td>Adds a button to the bottom bar of the popup.</td></tr><tr><td>WrapStyleTag(text: string, style: string, args: string)</td><td>string</td><td>Returns a wrapped string given style and args.</td></tr><tr><td>GetLocale(category: string, subcategory: string, key: string)</td><td>string</td><td>Gets translated locale from the current Language.json file with given category, subcategory, and key pattern.</td></tr><tr><td>GetLanguage()</td><td>string</td><td>Returns the current language (ie "English).</td></tr><tr><td>ShowChangeCharacterMenu()</td><td>null</td><td>Shows the change character menu if main character is Human.</td></tr><tr><td>SetScoreboardHeader(header: string)</td><td>null</td><td>Sets the display of the scoreboard header (default "Kills / Deaths...")</td></tr><tr><td>SetScoreboardProperty(property: string)</td><td>null</td><td>Sets which Player custom property to read from to display on the scoreboard. If set to empty string, will use the default "Kills / Deaths..." display.</td></tr><tr><td>GetThemeColor(panel : string, category : string, item : string)</td><td>Color</td><td>Gets the color of the specified item. See theme json for reference.</td></tr></tbody></table>
