UNPKG

phaser3-rex-plugins

Version:
35 lines (26 loc) 944 B
import CreateTitleLabel from '../utils/CreateTitleLabel.js'; const GetValue = Phaser.Utils.Objects.GetValue; var GetDisplayNameStyle = function (style) { var displayNameStyle = GetValue(style, 'displayName'); if (!displayNameStyle) { displayNameStyle = GetValue(style, 'tweaker.inputRow.title') || {}; } return displayNameStyle; } var GetDisplayNameLabelCallback = function (config) { var displayNameLabelCallback = GetValue(config, 'displayNameLabel'); if (!displayNameLabelCallback) { displayNameLabelCallback = function (index, item, items) { return { text: '' }; // Display nothing } } return displayNameLabelCallback; } var CreateDisplayNameLabel = function (scene, style) { return CreateTitleLabel(scene, undefined, style); } export { GetDisplayNameStyle, GetDisplayNameLabelCallback, CreateDisplayNameLabel, }