Client
showTextUI
Function to show HRLib's textUI
function HRLib.showTextUI(description: string)
Parameters description
description
- the textUI content
Preview

isTextUIOpen
Function to get the status of the textUI with option to get the latest description
function HRLib.isTextUIOpen(returnLastDescription: boolean?):
boolean status,
string? textUIContent
Parameters description
returnLastDescription
- sets whether or not the last description should be returned
Return description
status
- contains the status of the textUI as boolean, for is it open or is it closedtextUIContent
- the last content of the textUI (only available when returnLastDescription is true)
hideTextUI
Function to hide the textUI
function HRLib.hideTextUI()
progressBar
Function to set the progress bar with multiple options and three variants of progressBar
function HRLib.progressBar(
type: 'circle'|'horizontal'|'vertical',
options: {
duration: number,
description: string?,
position: 'center-left'|'center'|'center-right'|'bottom-left'|
'bottom-center'|'bottom-right'
},
await: boolean?,
freezePlayer: boolean?,
animation: {
duration: number?,
animName: string,
animDict: string
}
)
Parameters description
type
- the progress bar typeoptions
- the progress bar optionsawait
- sets whether or not the code should wait the progressBar to finishfreezePlayer
- sets whether or not the player is freezed during the progress baranimation
- sets whether or not the player should play an animation during the progress bar (if nil it won't start any animation)Fields:
duration
- the animation duration (in msec, if nil, it will be -1)animName
- the animation nameanimDict
- the animation dictionaryanimFlag
- the animation flag, see TaskPlayAnim for eScriptedAnimFlags (list of flags)
Preview



createAlertDialogue
Function to create an alert dialogue
function HRLib.createAlertDialogue(
options: {
title: string,
description: string?,
onAgree: function?,
onCancel: function?
}
)
Parameters description
options
- the dialogue's options
Preview

createInputDialogue
Function to create input dialogue
function HRLib.createInputDialogue(
options: {
title: string,
questions: {
type: 'text',
options: HRLibInputDialogueTextOptions
}[],
onCancel: function?
}
): string[]? result
Parameters description
options
- the dialogue's options
Return description
result
- contains the values from the inputed values
Preview

Notify
Function to send notification to a player with HRLib's notification system
function HRLib.Notify(-
description: string,
type: 'success'|'error'|'info'|'warning',
duration: number?,
pos: 'top-right'|'center-right'|'bottom-right'|'frombelow-right'|
'top-left'|'left-center'|'frombelow-left'?,
sound: boolean?
)
Parameters description
description - the notification's content
type - the notification type (default is 'info')
duration - the notification duration (default is 2500, in msec)
pos - the notification position on the screen (default is found in HRLib's config)
sound - sets whether or not the notification sound should be played (default is true)
Preview

Last updated