Class: TipDisplay

TipDisplay()

This class is concerned with choosing and displaying tips about how to play the game. This includes a text and one or more images.

Constructor

new TipDisplay()

Parameters:
Name Type Description
initData.tipScrolling boolean Whether or not to enable the player to scroll through the tips and the tip images.
initData.isOnLoadingScreen boolean Whether or not the tip display is initialized by the game loading screen.
hotloadData.tipFilesData Array | undefined Hotloaded value storing last time's tipFilesData.
hotloadData.tipIndex number | undefined Hotloaded value pointing to a specific tip.
hotloadData.tipImageIndex number | undefined Hotloaded value pointing to a specific tip image.
Source:

Members

CaptionNextTip

Source:

CaptionPreviousTip

Source:

ImagePath

Subdirectory of art/textures/ui storing the .png images illustrating the tips.
Source:

TextPath

Directory storing .txt files containing the multi and single player tips.
Source:

TipFilesDataFile

JSON file assigning one or more tip image files (.png) to each tip text file (.txt).
Source:

TooltipNextImage

Source:

TooltipNextTip

Source:

TooltipPreviousImage

Source:

TooltipPreviousTip

Source:

currentTip

Source:

currentTip

Source:

enableTipScrolling

Source:

imageControlPanel

Source:

nextImageButton

Source:

nextTipButton

Source:

previousImageButton

Source:

previousTipButton

Source:

tipFilesData

Source:

tipFilesData

Source:

tipImage

Source:

tipImageIndex

Source:

tipImageIndex

Source:

tipImageIndex

Source:

tipImageText

Source:

tipIndex

Source:

tipIndex

Source:

tipIndex

Source:

tipText

Source:

tipTitle

Source:

tipTitleDecoration

Source:

Methods

getHotloadData()

Source:

getLoadingScreenTip() → {Array}

Returns a randomized tip from a category. Choosing a category is randomized based on it occurrence probability.
Source:
Returns:
- An array with a single element containing a tip object.
Type
Array

getRandomWeightedCategory(isMultiplayer, tipFiles) → {Object}

Returns a randomized category from an array of categories based on the probability weight.
Parameters:
Name Type Description
isMultiplayer boolean True if we want to include the multiplayer category.
tipFiles Array An array containing all categories from the TipFilesDataFile.
Source:
Returns:
- A randomized category object.
Type
Object

onTipImageIndexChange()

Source:

onTipIndexChange()

Source:

rebuildTipButtons()

Source:

rebuildTipImageButtons()

Source:

scaleGuiElementsToFit()

Source:

updateTipImage()

Source:

updateTipText()

Source: