Class TJSSettingsEdit
Hierarchy
- SvelteComponent<TJSSettingsEdit.Props, TJSSettingsEdit.Events, TJSSettingsEdit.Slots>
- TJSSettingsEdit (view full)
Index
Constructors
Methods
Constructors
constructor
- new TJSSettings
Edit (options): TJSSettingsEdit Parameters
- options: ComponentConstructorOptions<TJSSettingsEdit.Props>
Returns TJSSettingsEdit
Methods
$destroy
$on
- $on<K>(type, callback): (() => void)
Type Parameters
Parameters
- type: K
- callback: ((e: CustomEvent<any>) => void)
- (e): void
Parameters
- e: CustomEvent<any>
Returns void
Returns (() => void)
- (): void
Returns void
$set
- $set(props): void
Parameters
- props: Partial<TJSSettingsEdit.Props>
Returns void
TJSSettingsEdit
provides the main Svelte component to display and modify settings registered withTJSGameSettingsWithUI
. Refer to the documentation inTJSGameSettings.register
andTJSGameSettings.registerAll
. Adding custom defined sections is accomplished withTJSGameSettingsWithUI.uiControl.addSection
. You must pass an instance ofTJSGameSettingsWithUI
as thesettings
prop.Note: to group settings into specific folders instead of a single top level section use the
folder
option when registering settings with TJSGameSettings. Also, please refer to the extra folder options described byTJSGameSettingsWithUI.uiControl.addSection
.The other prop
options
is an object instance defined byTJSSettingsCreateOptions
. This allows you to associate aTJSWebStorage
instance that automatically will track open / closed state of any section folders configured along with the scrolling position of the scrollbar.TJSSettingsEdit
supports two additional named slotssettings-header
andsettings-footer
allowing you to set Svelte components as a fixed header and / or footer to the main scrollable settings content.When
TJSSettingsEdit
is displayed the UI display data is generated fromTJSGameSettingsWithUI.uiControl
automatically. When theTJSSettingsEdit
component is destroyed any settings registered for UI display will be checked forrequiresReload
setting option. If the setting has changed whileTJSSettingsEdit
is displayed a modal dialog is opened to inform the user that a setting changed that requires reloading.If you need an easy to use slotted component that allows swapping from the main slot and
TJSSettingsEdit
please refer to TJSSettingsSwap.CSS Variables
CSS variables available include the following options: